0

indented block

What means expected an indented block https://www.sololearn.com/discuss/1514998/?ref=app

23rd Sep 2018, 4:50 AM
Maria Franke
2 Respuestas
+ 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.
23rd Sep 2018, 6:51 AM
Anna
Anna - avatar
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!!!
28th Sep 2018, 3:42 PM
Joe
Joe - avatar