Why does this not work? x = input("") if x==potato: print("YOU SIR, ARE AMAZING") else: print("WHY...") | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does this not work? x = input("") if x==potato: print("YOU SIR, ARE AMAZING") else: print("WHY...")

x = input("") if x==potato: print("YOU SIR, ARE AMAZING") else: print("WHY...")

11th Aug 2016, 5:34 PM
Dania Miller
Dania Miller - avatar
3 Answers
+ 1
if x == "potato": You want to compare the variable x with the String "potato". What you do is comparing the variable x the the variable potato but there is non.
11th Aug 2016, 5:45 PM
Elias Grube
Elias Grube - avatar
0
theres no variable called potato defined.. so its basically like if you were given a sheet of paper titled X and someone then comes to you and asks for you to compare a paper titled Potato to it but you don't have it so you frantically search for it but it doesn't exist
11th Aug 2016, 5:54 PM
Eric Reed
Eric Reed - avatar
0
Thanks!
12th Aug 2016, 12:04 PM
Dania Miller
Dania Miller - avatar