Error in Project 6 Checking device status


this is the error I am getting. can anybody help me with this?

Can you please provide me the complete Code that you have written.

Thank you so much for the reply, but I solved the error.

okay, but where have you gone wrong??