Sms alert using python

hi while i am writting my code as per described in lecture i get some error in line 9 . please help i have shared the screenshot


We have already solved a similar query. Please look into that

Let me know if you have any other queries

HI since the python variable etc …are case -sensitive …do check the while statement condition . instead of True u have written true.

Hi, Since python does not use any bracket system like the curly brackets(’{’, ‘}’) in C++ or C, so we have to provide spaces or tabs to make a block of code. In your code you have not given proper indents or spaces for while block and hence you are getting an indentation error. It should be like this,
while True:
print(“Reading sensor value”)
… and so on
I will recommend using tab key for indenting as if even a single line is not properly indented it will give an indentation error.
Also it should be ‘True’ and not ‘true’ along with while.

Hi @kmunim230 ,
The error is in the line following while statement, ie print statement. You’ve given a space after print ie print (“Reading sensor value”) but it has to be, print(“Reading sensor value” ie no space following the word print.