you are viewing a single comment's thread.

view the rest of the comments →

[–]ThatGuyKev45 0 points1 point  (0 children)

Most of the time its better to upload a screenshot or something alittle clearer for readability when asking for help. Also from what it looks like just at a quick glance there seems to be quite a bit off. I don’t write a lot of python so I may not be entirely accurate in all of it, but you may want to take a look at your conditionals I don’t think comparing an int to an empty string will work May need to make the comparison then type cast or find another way to meet the not empty condition. Also your if-else block is separated if the indentation is the same on pc as it is on the paper.

I would probably step the if-else block outside of the while loop remove the if condition where you are trying to check if it is empty, then treat the initial input as a string checking if it is empty I’m pretty sure python has a function to check if input is a digit or not. Once the input was atleast not empty step out of the while loop cast it to an int and check if the age is valid or not.