Jul-20-2023, 09:44 PM
DeaD_EyE is dead on, as usual!
Try this maybe for clarity?
Try this maybe for clarity?
for grade in range(100, -10, -10): if grade >= 100: print("You got an A+! Congrats!") elif grade >= 90: print("You got an A! Congrats!") elif grade >= 80: print("You got a B! Congrats!") elif grade >= 70: print("You got a C! Congrats!") elif grade >= 60: print("You got a D! Congrats! Ever heard of the library?") elif grade >= 50: print("You got an E! Ever heard of studying?") elif grade >= 40: print("You got an F! Ever read a book?") elif grade >= 30: print("You got a G! Ever go to the class?") elif grade >= 20: print("You got an H! Hope your EQ is big!") elif grade >= 10: print("You got an I! Go back to kindergarten. Do not pass Go, do not collect £100.") else: print("You got NOTHING! Congrats! You won a pointy hat with a large D on it!")