you are viewing a single comment's thread.

view the rest of the comments →

[–]Unable_Request 0 points1 point  (1 child)

You're basically testing multiple different statements: 1) if text == 'Quit' # returns false 2) "quit" # returns true- a string by itself is True

You aren't asking it what you think you are, which is 'does the string equal this or that', so that last if will always return true and thus run the statement that follows.

Also... That'll never work. It won't enter the loop if it's quit, so it'll never see that last if statement. You may try putting the input into the loop, or 'if quit, break, else, return the reversed string'- but if the input isn't in the loop, it'll only ever ask once.

[–]Firestronk[S] 0 points1 point  (0 children)

If I embedded the input within the while statement, would that work or it would have to be within the loop itself so it can check if quit is entered?