What the hell is wrong | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What the hell is wrong

I DON’t have idea of what is wrong :V https://code.sololearn.com/cuwgF1TGbwg1/?ref=app

6th Sep 2018, 2:09 PM
Artur Spain 🇪🇸
5 Answers
+ 13
a=input() if a == "yes": print("hello") #Use '==' for comparsion, '=' for assignment and indent after 'if'
6th Sep 2018, 2:28 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 3
thank you :)
6th Sep 2018, 2:29 PM
Artur Spain 🇪🇸
6th Sep 2018, 5:28 PM
Sri Raman Prasad
0
a=input() if (a==("yes")): print("hello")
6th Sep 2018, 7:02 PM
Sousou
Sousou - avatar
0
if a=("yes"): the problem is in this line here. You are using an assignment equals (=) instead of a comparison equals (==). If you change this line to: if a == "yes": it should work fine based on what I see you have in your code.
6th Sep 2018, 7:18 PM
Daiquana Coles
Daiquana Coles - avatar