Question: Write a Python program that prompts the user to enter six test names and their scores and writes them to a text file named tests.txt.

Write a Python program 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!