Intended | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Intended

I don't know what this term means when it applies to if statements. the question is which part of an if statement should be intended.

15th Jan 2018, 12:08 AM
Rufus Troothfist
Rufus Troothfist - avatar
2 Answers
+ 3
Look, the second line is indented: if 4 < 5: print(4) In Python you must indent the lines after a conditional if (or else, or elif) to define a class, to define a function like: def printSomething(): print("something") and etc... basically all following lines after a ":" must be indented until you finish the condition (or definition of something) (My actual english makes my explanations too large jajajaj and I can't describe it well, I hope this helps to you)
15th Jan 2018, 12:15 AM
Sebastián Zapata
Sebastián Zapata - avatar
+ 4
as far as im aware intended has nothing to do with if-statments unless you use it as a phase like this if-statement works as intended. meaning it works how you wanted it to work.
15th Jan 2018, 12:11 AM
D_Stark
D_Stark - avatar