Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#Integer or Float

num = 3.14
print(type(num))
num1 = 3
print(type(num1))

#Integers and Floats - Working with Numeric Data

# Arithmetic Operators:
# Addition: 3 + 2
# Subtraction: 3 - 2
# Multiplication: 3 * 2
# Division: 3 / 2
# Floor Division: 3 // 2
# Exponent: 3 ** 2
# Modulus: 3 % 2

# Comparisons:
# Equal: 3 == 2
# Not Equal: 3 != 2
# Greater Than: 3 > 2
# Less Than: 3 < 2
# Greater or Equal: 3 >= 2
# Less or Equal: 3 <= 2

num1 = 2
num2 = 3
print(num1==num2)

# String number and how to resolve it


num3 = '100'
num4 = '400'
print(int(num3)+int(num4))

You might also like