Why is that false and how is it right? (error: name 'yes' is not defined) How would it look with boolean? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is that false and how is it right? (error: name 'yes' is not defined) How would it look with boolean?

Start = input("Play? \n Type yes or wait \n") if Start == "yes": ... else: ...

22nd Jan 2017, 8:22 PM
Marv
2 Answers
+ 1
Do you use Python 2.7 or 3? In older versions, you should use raw_input instead of input. If you don't know, which version you have, place the following code in your file: import sys print(sys.version)
22nd Jan 2017, 9:55 PM
Heroes Killer
Heroes Killer - avatar
0
thanks
23rd Jan 2017, 5:42 AM
Marv