-
-
Save Echocage/a7c2849bcc2f2a300f25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
while True: | |
how_many_loops = input("How many grades will you be entering? ") | |
if '.' not in how_many_loops: | |
for _ in range(int(how_many_loops)): | |
while True: | |
score = int(input("Please enter a grade between 0 and 100: ")) | |
if score > 100 or score < 0: | |
print('Your number is out of range!', end=' ') | |
continue | |
break | |
break # Success | |
else: | |
print("You can't enter", how_many_loops, "grades!", end=' ') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment