Beginner Programmer here. I\'m trying to write a program that will ask a user for a quiz grade until they enter a blank input. Also, I\'m trying to get the input to go from disp
The input
function only accepts one argument, being the message. However to get around it, one option would be to use a print statement before with an empty ending character like so:
.
.
.
while grade != "":
count += 1
print("quiz ", count,": ", end="")
grade = input()
Use .format, e.g.:
count = 0
while grade != "" :
count += 1
grade = input('quiz {}:'.format(count))
Of course, it is easy to make the variable within the str () function to convert it from a number to a string and to separate all the arguments using "+" and do not use "-" where programmatically when using "+" Python will be considered as one string
grade = input ("quiz 1: ")
count = 1
while grade != "" :
count += 1
grade = input ("quiz "+ str(count) + ": ")