Indentation Error in python code

I am getting an error for temperature monitoring system as follows

1 Like

Give a space after the “print” command.
it should be like:

    print ("Reading sensor value")

You need to indent your code. For example if your code have an if condition your code should be indented as shown below:

if(your condition):
/*tab space*/your statement
/*tab space*/your statement
/*statements outside if condition*/
1 Like

INDENTATION in python means that Python uses indentation instead of braces to structure its program and scripts into block.

This error occurs because there are space or tab errors.
You may experience this error if you have not placed the tabs/spaces correctly.

For Python, INDENTATION is an important concept and it also reduces the use of braces like in C or java. To Solve the above error you just have to give a space between print and (“Reading Sensor Value”).

This error occurs because there are space or tab errors.You need to indent your code. Check the indent in the line 9 in your code and there is an error in the space before print statement in line9, check it carefully
perform some this action:
/ tab space /statement
/ tab space /statement
/ statements outside if condition /

Hi @sharmarohitganesh727,

Please share your code and also check this thread Error in Telegram Project code execution

Indentation is mandatory in Python…So if u not written the code with correct indentation then it will show indentation error in command prompt…

So write the code exactly same as from the bolt training section…

Visit the below link for more detailed explanation about Indentation