0

x=str(input("continue yes/no?: "))

... x=str(input("continue yes/no?: ")) if x=="no" : ... when I type in the program on my computer "no" NameError appears: name "no" is not defined, the same for yes, how to resolve it?

9th Nov 2017, 9:25 PM
Dawid Pado
Dawid Pado - avatar
1 Answer
+ 3
The portion of the code you're showing should work fine as long as there is some indented code after the if statement. You don't need to wrap the input() in str() as input() already returns a string. You may have an issue somewhere else in your code. Can you post the rest of it, or a link to it?
9th Nov 2017, 9:52 PM
ChaoticDawg
ChaoticDawg - avatar