226k views
25 votes
Write a program that will ask the user to input a number beween 50-60​

User Andy Ayers
by
5.8k points

1 Answer

8 votes

Answer:

def main():

askUser = int(input("Choose a number between 50-60"))

if askUser >= 50:

if askUser <= 60:

print("You've chosen the number " + str(int(askUser)) + "!")

else:

print("Error, please enter a number between 50-60!")

main()

Step-by-step explanation:

The program asks the user to pick a number between 50-60. If they enter anything else, an error message will pop up redirecting them to choose a number only from 50-60.

User Amin Joharinia
by
6.1k points