Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #number checker
- while True:
- print("please enter a whole number or type exit to close...")
- x=input("")
- if str (x) == "exit":
- break
- elif int (x) <0:
- print("you entered a negative value!")
- elif int (x) >=0 and int (x)<=9:
- print("you entered a number between 0 and 9!")
- elif int (x) >9 and int (x)<=99:
- print("you entered a number in the 10's!")
- elif int (x) >99 and int (x)<=999:
- print("you entered a number in the 100's!")
- elif int (x) >999 and int (x)<=999999:
- print("you entered a number in the 1000's!")
- elif int (x) >999999:
- print("you entered a number greater than 1,000,000!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement