+ 1

Help!!

Hi everyone! Can someone tell me why this is wrong and where? Thanks in advance! x = 15 y = 30 if y == 15*2: print("correct") else: print("nada")

19th Oct 2018, 3:05 AM
Martino Rabaioli
Martino Rabaioli - avatar
7 Réponses
+ 6
It's the indentation. The else should have the same indentation as the corresponding if. x = 15 y = 30 if y == 15*2: print("correct") else: print("nada")
19th Oct 2018, 3:15 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Oooh wow i see! thanks guys!
19th Oct 2018, 12:31 PM
Martino Rabaioli
Martino Rabaioli - avatar
+ 1
dont use tab before else wrong code: else: print("nada") correct code: else: print("nada")
19th Oct 2018, 8:23 AM
Jingga Sona
Jingga Sona - avatar
+ 1
Mad Gipnoz anytime!👍😊🙏
19th Oct 2018, 1:11 PM
Jingga Sona
Jingga Sona - avatar
0
what is your answer?
19th Oct 2018, 7:25 AM
niteOwLTwO
niteOwLTwO - avatar
0
You're welcome Martino Rabaioli 😊
19th Oct 2018, 1:08 PM
Kishalaya Saha
Kishalaya Saha - avatar
0
Jingga Sona sorry man. I'm so confused 😕... Y did u write my name?
19th Oct 2018, 3:01 PM
Markus Dvachevskiy
Markus Dvachevskiy - avatar