+ 1
How can I make the user keep typing in number?
I want to make it so when the user type in a string, it will keep asking them to type in a number or an integer. https://code.sololearn.com/cu0R3eonkX6E/?ref=app
4 Antworten
+ 3
My favourite pattern looks about like this:
while True:
inp = input()
if inp.isdigit():
break
+ 2
https://code.sololearn.com/caib2ngcNs9x/?ref=app
But it doesn't work here at SL because the user input can be entered only once.
+ 1
It is not possible on SL sorry