Sophie has $300 saved up and decides to spend it on different activities and items. After her expenses, she plans to divide the remaining money equally among her three friends. Write a Python program to calculate how much money Sophie has left after her expenses and how much each friend will receive. Use an if condition to tell her if she has enough money to give to her friends or if she spent all her money.
- Start by defining a variable for the initial savings and set it to $300.
- Ask Sophie how much she spent on a concert ticket and store it in a variable called
concert_cost
(as an integer). - Ask how much she spent on dinner and store it in a variable called
dinner_cost
(as an integer). - Ask how much she spent on shopping and store it in a variable called
shopping_cost
(as an integer). - Ask how much she spent on transportation and store it in a variable called
transportation_cost
(as an integer). - Ask how much she spent on a movie and store it in a variable called
movie_cost
(as an integer). - Calculate the total expenses by adding
concert_cost
,dinner_cost
,shopping_cost
,transportation_cost
, andmovie_cost
. - Calculate the amount left by subtracting the total expenses from the initial savings.
- Calculate the amount each friend will receive by dividing the amount left by 3 if the amount left is greater than zero.
- Use an if condition to check if there is still money left to give to her friends or if she spent all her money.
- Print a message that tells her how much she has left and whether she can give money to her friends or if she spent all her money.