You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# All these are objects, so we can create a new integer, float, or complex number by using the class name and parentheses, which will call its constructor..
### Integers are whole numbers, they do not contain any decimals.
a = 12 # 12
b = -543 # -543
c = +92381201 # 92381201
d = int(3) # 3
e = int(6.1235) # 6
f = int(6.98994) # 6
g = int("512") # 512
h = int("-8") # -8
### Floats are integers that allow decimal places.
i = 3.0
j = 0.1235
k = +987546.56
l = float(105)
m = float(-12.123)
n = float("56")
o = float("63.2")
p = float("inf") # positive infinity
q = float("-inf") # negative infinity
r = float("nan") # not a number
s = 3e12
t = -87E4
u = 2e-20
### Complex numbers, have a real and an imaginary part