+ 1

Error

A= 1 if A == 1: print("Hey") Showing error in if

12th Dec 2018, 2:28 PM
Nitin Tiwari
Nitin Tiwari - avatar
6 ответов
+ 5
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2285/ Alex, it doesn't have to be 4 spaces, it can be any number of spaces more than 0, but there is one requirement, the scripts at same level must have aligned indentation https://code.sololearn.com/c8Tyi716A9Q7/?ref=app
12th Dec 2018, 2:34 PM
Gordon
Gordon - avatar
12th Dec 2018, 2:29 PM
Rstar
Rstar - avatar
+ 5
Try this: A=1 If A==1: print("Hey!")
12th Dec 2018, 2:30 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 5
Leave 4 spaces after using "if" (the same thing works for "else , while , and for)
12th Dec 2018, 2:31 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 5
Gordon I didn't knew that , thx for the info!
12th Dec 2018, 3:19 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 2
Thank you so much
12th Dec 2018, 2:33 PM
Nitin Tiwari
Nitin Tiwari - avatar