Write a program named program6_1.py that prompts the user to enter six test names and their scores and writes them to a text file named tests.txt. You must use a loop. Each input should be written to its own line in the file. The program should generate a confirmation message when done.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

I just need program6_2.py solved

 

program6_1.py
Write a program named program6_1.py that prompts the user to enter six test names and their scores and writes them to a text file named tests.txt. You must use a loop. Each input should be written to its own line in the file. The program should generate a confirmation message when done. See SAMPLE OUTPUT.

SAMPLE OUTPUT
Entering six tests and scores

Enter test name objects
Enter % score on this test 88
Enter test name loops
Enter % score on this test 95
Enter test name selections
Enter % score on this test 86
Enter test name variables
Enter % score on this test 82
Enter test name files
Enter % score on this test 100
Enter test name functions
Enter % score on this test 80
File was created successfully

program6_2.py
Write another program named program6_2.py that uses a loop to read and process tests.txt from program6_1.py. The program must output a two-column table (see SAMPLE OUTPUT) showing the test names and scores. When the table is complete, the average should be displayed accurate to one decimal place.

SAMPLE OUTPUT
Reading six tests and scores

TEST          SCORE
objects                88
loops                   95
selections           86
variables             82
files                   100
functions             80
Average is 88.5
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr