0

whats wrong with that code?

https://code.sololearn.com/ck0l471qTj21/#py ive allready asked it and i de tried agin and it till doesnt work//// thats the erorr masage"File "..\Playground\", line 13 num1 = float(input("Enter a number: ")) ^ IndentationError: expected an indented block "

11th Apr 2018, 7:29 PM
Yosef
Yosef - avatar
4 ответов
+ 7
The indentation step has to be consistent throughout the block, you can't change it in-between.
11th Apr 2018, 7:38 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
13th Apr 2018, 5:21 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Python is very fussy about proper indentation. Blocks in python is defined by indentation...( similar to braces in c, cpp, java) I observed that you are not indenting the code for if, else block in several places Give proper indentation
11th Apr 2018, 7:36 PM
Bishal Sarang
Bishal Sarang - avatar
+ 1
You need to indent your stement after the condition in the elif statement. python is always sesitive with white spaces. .
12th Apr 2018, 6:06 AM
Emmanuel Chweya
Emmanuel Chweya - avatar