Easy as Raspberry Pi: A step by step beginner's guide to building your own internet of things with the Raspberry Pi Model 3 by Matthew Chen

Easy as Raspberry Pi: A step by step beginner's guide to building your own internet of things with the Raspberry Pi Model 3 by Matthew Chen

Author:Matthew Chen [Chen, Matthew]
Language: eng
Format: epub
Published: 2017-04-29T07:00:00+00:00


Python also supports thewhile loop. Thewhile loop also repeats any code within it. It does so until a condition is no longer met rather than until a counter reaches a number.

x = 0 # can’t compare variables unless they exist

while (x != 4):

x = int (input(“Input 4 to end the loop: ”))

The while structure is like the Ifstatement with the condition residing within the parentheses. Withwhile loops, the code runs until the condition is false, rather than just once. Make sure that when you code awhile loop that the condition does become false at some point in the code, or else it will run forever in what is called an infinite loop.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.