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

Connected

Exercise

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?

Instructions

100 XP
  • 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.