Get startedGet started for free

Python as a calculator

Working with numbers and performing calculations are very common programming tasks. In this exercise, you'll need to perform two calculations!

This exercise is part of the course

Introduction to Python for Developers

View Course

Exercise instructions

  • Print the sum of 19 + 17.
  • Print the result of subtracting 12 from 99.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Add 19 and 17
print(____ ____ ____)

# Subtract 12 from 99
print(____ ____ ____)
Edit and Run Code