+ 1
how can i limit numbers in python ?
i cant limit numbers . how can i limit numbers example question like this the question 1<n<10000 but i coudnt find solution can you give me support
2 Answers
+ 3
Samandar Turobov ,
you can use this procedure:
# loop
(1) input a number and convert it to int
(2) check if number is in the required range
> if number is correct, exit the loop
> otherwise input will be repeated
0
thank you can i use it like this a=int(input(range(1,10001)))