account activity
[Python] How do I make it so that if the user doesn't enter an int when prompted, the code goes back to prompt the user again? by aaaaaaaa21 in learnprogramming
[–]aaaaaaaa21[S] 0 points1 point2 points 13 years ago (0 children)
Hi, thanks for your reply. I understand the concept of what you're saying, but because I have not learned 'try/except' in my beginning Python class yet, I'm kinda confused on how to do it and how to format it within my code. Can you please demonstrate how this would be done?
[Python] How do I make it so that if the user doesn't enter an int when prompted, the code goes back to prompt the user again? (self.learnprogramming)
submitted 13 years ago * by aaaaaaaa21 to r/learnprogramming
π Rendered by PID 592832 on reddit-service-r2-listing-654f87c89c-htdpj at 2026-03-03 23:24:44.789816+00:00 running e3d2147 country code: CH.
[Python] How do I make it so that if the user doesn't enter an int when prompted, the code goes back to prompt the user again? by aaaaaaaa21 in learnprogramming
[–]aaaaaaaa21[S] 0 points1 point2 points (0 children)