Python in IOT
Python in IOT
What is Python
• A local variable is
created within a
function and can be
only used inside that
function. Such a
variable has a local
scope.
• Example:
Data Types
• Data type specifies the type of value a variable requires to do
various operations without causing an error. By default, python
provides the following built-in data types:
• Numeric data: int, float, complex
• int: 3, -8, 0
• float: 7.349, -9.0, 0.0000001
• complex: 6 + 2i
• more on numeric data types in the number chapter.
• Example:
• sequence1 = range(4,14,2)
• for i in sequence1:
• print(i)
• Output:
• 4
• 6
• 8
• 10
• 12