Question: python: Say you are writing a program that converts a numeric score into a letter grade but the only valid numeric grades are between 0
python:
Say you are writing a program that converts a numeric score into a letter grade but the only valid numeric grades are between 0 and 100. The users of your program are new to this software and you are worried they might enter invalid numbers like -20, or 452. Assuming you have gotten user input, converted it to a float, and stored it in the variable numericGrade,how can you force your user to continue entering numeric values until they are valid?
A) Use decision structure and input. If numericGrade < 0 or numericGrade >100, ask for input again
B) Use repetition structure and input. While numericGrade <0 or numericgrade> 100, ask for input again
C) Use decision structure and input. If numericGrade < 0, ask for input again
D) Use repetition structure and input. While numericGrade >= 0 and numericGrade =< 100, ask for input again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
