107,094 views
20 votes
20 votes
Write a program that will ask the user to input a number beween 50-60​

User Gabriel D
by
2.8k points

1 Answer

19 votes
19 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 Adam Norberg
by
3.1k points