John has $400 saved up and decides to spend it on different activities and items. After his expenses, he plans to divide the remaining money equally among four investment options. Write a Python program to calculate how much money John has left after his expenses and how much each investment will receive. Use multiple if conditions to tell him if he has enough money to invest or if he spent all his money.
- Start by defining a variable for the initial savings and set it to $400.
- Ask John how much he spent on a concert ticket and store it in a variable called
concert_cost
(as an integer). - Ask how much he spent on a dinner and store it in a variable called
dinner_cost
(as an integer). - Ask how much he spent on shopping and store it in a variable called
shopping_cost
(as an integer). - Ask how much he spent on transportation and store it in a variable called
transportation_cost
(as an integer). - Ask how much he 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.
- Use multiple if conditions to check:
- If the amount left is greater than zero, calculate the amount each investment will receive by dividing the amount left by 4.
- If the amount left is zero, notify John that he has no money left.
- If the amount left is negative, notify John that he spent more than his savings.
- Print a message that tells him how much he has left and whether he can invest the money or if he spent all his money.