← Python from Scratch
Lesson 1 of 78 · 5 XP
Warm-up: Python as a calculator warm-up
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
Python can count like a calculator. Put an expression inside print() and Python prints the answer:
print(2 + 2) # 4
print(10 - 3) # 7
Note: no quotes. If you write print("2 + 2"), Python prints the text 2 + 2 itself, not the answer.
Task. Make Python calculate and print 7 + 8.
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.