A group of friends decided to spend a weekend organizing a community sports event. Each friend had $200 saved up, but they also earned extra money by selling tickets and refreshments at the event. Write a Python program to calculate how much each friend has left after organizing the event and earning from ticket sales.
Start by defining the initial amount saved as saved_amount and set it to 200.
- Ask each friend how much they spent renting the sports venue and store it in
venue_rental. - Ask how much they spent on sports equipment for the event and store it in
equipment_cost. - Ask how much they spent on prizes for the winners and store it in
prizes_cost. - Ask how much they spent on refreshments for the players and spectators and store it in
refreshments_cost. - Ask how much they earned from selling event tickets and store it in
ticket_sales. - Ask how much they earned from selling refreshments during the event and store it in
refreshments_sales.
- Calculate the total amount spent by adding up
venue_rental,equipment_cost,prizes_cost, andrefreshments_cost. - Calculate the total amount earned by adding
ticket_salesandrefreshments_sales. - Subtract the total amount spent from the sum of
saved_amountand the total earnings to find the remaining balance.
Use an if condition to check:
- If the remaining balance is positive, print how much money each friend has left.
- If the remaining balance is zero or negative, print that they spent more than they saved.
Additionally, if any of the spending exceeds half of the saved_amount, print a warning message indicating they are spending too much on a single activity.
