Get startedGet started for free

Calculations with variables

You've now created a savings variable, so let's start saving!

Instead of calculating with the actual values, you can use variables instead.

How much money would you have saved four months from now, if you saved $10 each month?

This exercise is part of the course

Introduction to Python

View Course

Exercise instructions

  • Create a variable monthly_savings, equal to 10 and num_months, equal to 4.
  • Multiply monthly_savings by num_months and assign it to new_savings.
  • Print the value of new_savings.

Hands-on interactive exercise

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

# Create the variables monthly_savings and num_months



# Multiply monthly_savings and num_months
new_savings = ____

# Print new_savings
Edit and Run Code