+ 1
Whats an "Intendation Error"
This Error wrecks all my codes and I dont know what it is, pls help me.
5 Respostas
+ 3
It means you have wrong formatting for your code. Please post your code so we can help!
+ 2
EXAMPLES:
## WRONG!
if(5 > 4):
print("Yes")
## CORRECT
if(5 > 4):
print("Yes")
When you indent your python code make sure that there's atleast 4 spaces, if not change your TAB settings (depends on your editor.)
0
in Python indentation is used to create a block of code.
example in C++ you would do this to create a block of code with "if" :
if (x== 10) {
cout << " x is greater than 5"; }
you use { } to create a block of code
in Python it would be something like this :
if x == 10:
print("x is greater than 5")
the second line is indented to be in the "if" block
0
THX guys
- 1
Try:
Num = 6
print (Num/0)
except IntendationError :
print ("crap")
finally :
print ("Dont know if it works")