0

What is wrong with this code x=input If x=hi Print(hi back) Else Print(hi back) Not the qoutantions The if input how does that work Please

24th Dec 2016, 3:03 AM
Nate
2 Answers
+ 1
you need brackets for the input function to work and you are giving x a new value remember = means assign and == means equal this is how it should be x = input() if x=="hi": print("hi back") else: print("hi back from else") and btw its not a good idea to print the same thing in either cases u need to know what print what
24th Dec 2016, 4:21 AM
demonicsimba_13
0
Thank you very much I had to think of a example so hi is all I could think of.
24th Dec 2016, 3:02 PM
Nate