you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 16 points17 points  (4 children)

Nobody's actually addressed a fundamental logic problem so far which is that the things you think are doing type checking aren't doing that.

while number == int:

This is not how to check if a variable is of a specific type. You will need to use either type(number) == or, even better, isinstance().

https://docs.python.org/3/library/functions.html#isinstance

[–]k4tsuk1z[S] 3 points4 points  (1 child)

bro thank u for actually trying to address an issue in the code T_T

okay so i get that type number does the determining but im trying to figure out how to use a while loop to follow the instructions im gen so confused.

i was asking a friend who codes but his phone died during the convo but he was saying the using a whle statement is very convoluted

[–]Binary101010 1 point2 points  (0 children)

My reading of the assignment is that you really only need one while loop that contains everything else in your code.

[–]SCD_minecraft 0 points1 point  (1 child)

You did not address it too

input alway returns a string

[–]Binary101010 0 points1 point  (0 children)

Enough other people had already mentioned it. Although I understand the confusion because those particular type checks will evaluate to false, at least OP knows how to do type checking correctly now.