0
Can any body help me ?
Hey Guys, I am new to python and i wanted to make a little program and i got confused at something :: input("choose a number between 1 and 9") So, i want to make a code that stops the user when he chooses a number >9 .
2 odpowiedzi
+ 5
while True:
a=int(input("choose number 1 and 9"))
if a>9:
break
+ 2
1. Assign a variable to your input,
IE: x = int(input())
Then set up an if/else statement,
IE:
if x > 9:
print("Your number is too big")
else:
The code you want to happen on nums between 1 & 9