mirror of
https://github.com/Asabeneh/30-Days-Of-Python.git
synced 2026-06-06 21:09:15 +08:00
26 lines
741 B
Python
26 lines
741 B
Python
# Introduction
|
|
# Day 1 - 30DaysOfPython Challenge
|
|
|
|
print("Hello World!") # print hello world
|
|
|
|
print(2 + 3) # addition(+)
|
|
print(3 - 1) # subtraction(-)
|
|
print(2 * 3) # multiplication(*)
|
|
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})) # Tuple
|