Multiple Arguments in an Input?

前端 未结 3 1670
死守一世寂寞
死守一世寂寞 2021-01-25 16:50

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

3条回答
  •  天命终不由人
    2021-01-25 17:34

    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()
    

提交回复
热议问题