0
indented block
What means expected an indented block https://www.sololearn.com/discuss/1514998/?ref=app
2 Answers
+ 4
Are you sure you linked the correct thread?
"expected an indented block" sounds like a python problem to me.
"Indented" means that there are spaces or tabs at the beginning of the line:
This line is indented
This line is even more indented
This line is not indented
In python, using indentation is important to write correct code. For example in an if statement, you have to use indentation like this:
if a > b:
print('a is bigger than b')
else:
print('a is not bigger than b')
Without indentation, it looks like this:
if a > b:
print('a is bigger than b')
else:
print('a is not bigger than b')
But this is not correct. It will raise a SyntaxError and tell you that it expected an indented block.
0
yes, but if i do so: elif h == "3":
print("This is Say-Bot")
y = input("\nPrint anyone Greeting (ex.Hi): ")
if y == "Hello" or "Hi" or "Ciao":
print("Hi. How are u?")
else:
print("Error")
and write "1", it is an Name Error!!!