Home > other >  Python exercises
Python exercises

Time:09-24

Bosses help python small white
Added a whole morning or
How can prompt error after enter again!
Thank you very much

CodePudding user response:

Here is the C/C + + area...

CodePudding user response:

Score=int (input (" please enter the scores (press & lt; ESC> And enter to exit) : "))
While score not in range (0, 101) :
Print (" result is wrong, please input again: ")
Score=int (input (" please enter the scores (press & lt; ESC> And enter to exit) : "))
If the score in the range (90, 101) :
Print (" A ")
Elif score in the range (80, 90) :
Print (" B ")
Elif score in the range (70, 80) :
Print (" C ")
Elif score in the range (60, 70) :
Print (" D ")
The else:
Print (" E ")

CodePudding user response:

refer to the second floor 5250 response:
score=int (input (" please enter the scores (press & lt; ESC> And enter to exit) : "))
While score not in range (0, 101) :
Print (" result is wrong, please input again: ")
Score=int (input (" please enter the scores (press & lt; ESC> And enter to exit) : "))
If the score in the range (90, 101) :
Print (" A ")
Elif score in the range (80, 90) :
Print (" B ")
Elif score in the range (70, 80) :
Print (" C ")
Elif score in the range (60, 70) :
Print (" D ")
The else:
Print (" E ")
thank you very much
  • Related