← Python from Scratch
Lesson 20 of 78 · 5 XP
Warm-up: three operations warm-up
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
The basic operations with numbers: + addition, - subtraction, * multiplication.
a = 7
b = 2
print(a + b) # 9
print(a - b) # 5
print(a * b) # 14
Task. Read two integers (each on its own line) and print, on three lines, their sum, their difference (first minus second) and their product.
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.