Two Integers

Output



50 <class 'int'>
Code
x = 5
y = 10
z = x * y
print(z)
print(type(z))

Division - Always Float

Output




3.0 <class 'float'>

2.25 <class 'float'>
Code
a = 9
b = 3
c = 4
x = a / b
print(x)
print(type(x))
print()
y = a / c
print(y)
print(type(y))

Two Floats

Output



7.0 <class 'float'>
Code
a = 2.5
b = 4.5
c = a + b
print(c)
print(type(c))

Mixed - Always Float

Output



3.0 <class 'float'>
Code
a = 5
b = 2.0
c = a - b
print(c)
print(type(c))