Fire alarm system

Please help me as my program rum and give a result but could not stop it in loop ,and led light which is connected to circuit doesn’t glow

Please take care of the indentation in python.
In your code, under while block, there are only three lines of code.These three lines will be executed infinitely. I think try block should come within while block.
Rearranging the lines using tab key will solve this problem.

Hope this have helped.

1 Like