Hello, I've spent hours but can't seem to figure out how. This is the question:
modify the program so that the prompts that ask the user to enter a transaction include the number of the transaction that should be entered next. Here's what the prompts should look like:
Enter quiz score 1 10
Enter quiz score 2 12
...
Note that the prompts should remain on the same line as the user's inputs (which are shown in bold above). In addition, make sure that the first quiz score has the number 1, the second quiz score has the number 2, and so on. Hint: Instead of specifying the prompt as part of the input statement, use a separate print statement that comes before the input statement, and change the input statement so that it does not take an argument, as follows:
score = input()
This is what I have so far:
numQuiz = input("Enter the number of quizzes: ")
total = 0
for i in range(numQuiz):
score = input("Enter a quiz score: ");
total = total + score
print "------------------------------------"
# Compute the average and print it.
average = total / numQuiz
print "The average is", average
I'm guessing I should use another for statement, but I keep getting error.
Please help!