0

what is wrong in this code

x=7 y=6 z=10 if x==y: print("True") else: if x<=z: print("mined") else: print("hihi")

15th Nov 2016, 1:34 PM
Tamer Borg
Tamer Borg - avatar
4 Answers
+ 7
Your tabs, or "whitespace" is off. It should look like: x=7 y=6 z=10 if x==y: print("True") else: if x<=z: print("mined") else: print("hihi")
15th Nov 2016, 3:03 PM
Keto Z
Keto Z - avatar
+ 4
you just should put tab-s correctly.. in python putting right tab is very important for if else statements to work, as here we don't have {} brackets in order to say where the "if" statement starts and where it ends.. Just look at Keto Z's code and compare it with yours.. you'll see the difference between the whitespacing (tabs) :)
15th Nov 2016, 3:54 PM
Rebeka Asryan
Rebeka Asryan - avatar
+ 1
just hit backspace
8th May 2017, 5:00 AM
Harish Kumar G
Harish Kumar G - avatar
0
how can i make whitespace on
15th Nov 2016, 3:14 PM
Tamer Borg
Tamer Borg - avatar