+ 3

I tried the code but it showed some error.

X=5 Y=10 If x > Y: Print("hey") Else: Print("bye") Tell me where im wrong.

5th Dec 2016, 5:29 PM
Deepak Thakur
Deepak Thakur - avatar
8 Answers
+ 3
x = 5 y = 10 If x > y: print("hey") else: print("bye")
6th Dec 2016, 2:39 AM
Grady
Grady - avatar
+ 2
x is in small in third line and yes please do take care of indentation while making programs in python
5th Dec 2016, 5:38 PM
Vipul Walia
Vipul Walia - avatar
+ 2
yes you have to use either x or X keep in small letters and there should be indentation if (x>6): print(" x is here"); else: print(" no it's false ");
5th Dec 2016, 7:13 PM
Sandeep Chatterjee
+ 1
Also, the keywords (if and else statements and the print function) are in small letters. Keep that in mind in the future, it's essential.
5th Dec 2016, 5:46 PM
Amaras A
Amaras A - avatar
+ 1
x AND X
25th Dec 2016, 4:13 PM
Jhonatan Games Studio begins
Jhonatan Games Studio begins - avatar
0
Sir please do write the exact program as you have executed otherwise it looks fine check python version because after 2.7 version few changes of writing code is different so look around there.
5th Dec 2016, 7:17 PM
Vipul Walia
Vipul Walia - avatar
0
I'm getting so much errors I don't understand why..
7th Dec 2016, 3:35 PM
David
0
I need not say anything about the code,all I can say is try your level to avoid capital letters
10th Dec 2016, 9:12 AM
N.V.S.R.Sandeep
N.V.S.R.Sandeep - avatar