Python On Your Own. Lesson 2.
Jul 15, 2023
Arithmetic Operations
Open a file and write the following:
print("Addition: ")
print(4+5)
print("Substraction: ")
print(4–5)
print("Multiplication: ")
print(4*5)
print("Division: ")
print(4/5)
print("Remainder of the integer division: ")
print(4%5)
Save it with the name operations.py
Run it like python3 operations.py
Addition:
9
Substraction:
-1
Multiplication:
20
Division:
0.8
Remainder of the integer division:
4
Assignment
Write a code to find the area of the circle with 11 units of diameter.