0

if 20 > 10 : print("20 greater than 10)" in python playground but it says error can u tell me what I did wrong

if 20 > 10 : print("20 greater than 10)" what did I do wrong?

27th Nov 2018, 7:27 PM
Game Hacker
Game Hacker - avatar
11 Respostas
+ 7
You have to indent after if Other languages have curly braces but python doesn't use them so indenting is required if 20 > 10: print("20 > 10")
27th Nov 2018, 7:43 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 7
because it isn't indented
27th Nov 2018, 7:46 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 7
It's working for me. Maybe you forgot deleting text or you didn't copy it. If you didn't copy, click three dots at top right corner and click copy text
27th Nov 2018, 7:51 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 7
ok I noticed it now sorry
27th Nov 2018, 7:56 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 1
I see my mistake I didn' t include the " in the inside the print( 20 > 10)
27th Nov 2018, 7:56 PM
Game Hacker
Game Hacker - avatar
0
I need to know what I did wrong?
27th Nov 2018, 7:40 PM
Game Hacker
Game Hacker - avatar
0
if 10 > 5: print("10 greater than 5") Why does this work and the one that I wrote doesn' t?
27th Nov 2018, 7:45 PM
Game Hacker
Game Hacker - avatar
0
if 10 > 5: print("10 greater than 5") print("Program ended") This is the code python wrote as an example
27th Nov 2018, 7:46 PM
Game Hacker
Game Hacker - avatar
0
Mert the code u wrote me didn' t work in python playground
27th Nov 2018, 7:48 PM
Game Hacker
Game Hacker - avatar
0
Now it works thanks dude
27th Nov 2018, 7:56 PM
Game Hacker
Game Hacker - avatar