mirror of
https://github.com/Asabeneh/30-Days-Of-Python.git
synced 2026-06-12 21:01:48 +08:00
24 lines
717 B
Python
24 lines
717 B
Python
# Introduction
|
|
# Day 1 - 30DaysOfPython Challenge
|
|
|
|
print(3 + 2) # addition(+)
|
|
print(3 - 2) # subtraction(-)
|
|
print(3 * 2) # multiplication(*)
|
|
print(3 / 2) # division(/)
|
|
print(3 ** 2) # exponential(**)
|
|
print(3 % 2) # modulus(%)
|
|
print(3 // 2) # Floor division operator(//)
|
|
|
|
# Checking data types
|
|
|
|
print(type(10)) # Int
|
|
print(type(3.14)) # Float
|
|
print(type(1 + 3j)) # Complex
|
|
print(type('Asabeneh')) # String
|
|
print(type([1, 2, 3])) # List
|
|
print(type({'name':'Asabeneh'})) # Dictionary
|
|
print(type({9.8, 3.14, 2.7})) # Set
|
|
print(type((9.8, 3.14, 2.7))) # Tuple
|
|
print(type(3 == 3)) # Bool
|
|
print(type(3 >= 3)) # Bool
|