Oct-04-2021, 02:17 AM
I think all programming languages are case sensitive, so Number is not the same variable as number.
This test is incorrect or incomplete. What do you do if the user enters 11?
The requirement says the user has to enter a number. But you are not using the input as a number. Do you need to convert the input string to an int? Is it necessary for the comparison? int(input()) is dangerous in Python. If the user enters a letter the program will crash. If the user enters a number with a decimal the program will crash. If the user presses enter without typing any characters the program will crash. If you don't plan on doing math with the input leave it as a string and compare it to '10' instead of 10.
This test is incorrect or incomplete. What do you do if the user enters 11?
if number== 10 : ... elif Number < 10: ...The requirements use the word "repeatedly". Where is there any "repeatedly" in your program? You should look at loops. There are for loops and while loops in Python. Which is a good choice for this problem?
The requirement says the user has to enter a number. But you are not using the input as a number. Do you need to convert the input string to an int? Is it necessary for the comparison? int(input()) is dangerous in Python. If the user enters a letter the program will crash. If the user enters a number with a decimal the program will crash. If the user presses enter without typing any characters the program will crash. If you don't plan on doing math with the input leave it as a string and compare it to '10' instead of 10.