EasyManua.ls Logo

SunFounder ESP32 - Page 306

Default Icon
771 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SunFounder ESP32 Starter Kit
(continued from previous page)
print(a)
print(b)
print(c)
Note: You cannot convert complex numbers into another number type.
3.6.10 Operators
Operators are used to perform operations on variables and values.
Arithmetic Operators
Assignment operators
Comparison Operators
Logical Operators
Identity Operators
Membership Operators
Bitwise Operators
Arithmetic Operators
You can use arithmetic operators to do some common mathematical operations.
Operator Name
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
** Exponentiation
// Floor division
x = 5
y = 3
a = x + y
b = x - y
c = x * y
d = x / y
e = x % y
f = x ** y
g = x // y
print(a)
print(b)
print(c)
print(d)
print(e)
(continues on next page)
300 Chapter 3. For MicroPython User

Table of Contents