1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python

Connected

Exercise

Python as a calculator

Python is perfectly suited to do basic calculations. It can do addition, subtraction, multiplication and division.

The code in the script gives some examples.

Now it's your turn to practice by writing some code yourself.

Instructions

100 XP
  • Print the result of subtracting 5 from 5 under # Subtraction using print().
  • Print the result of multiplying 3 by 5 under # Multiplication.