You are tasked with creating a Python program to help plan a birthday celebration
You are tasked with creating a Python program to help plan a birthday celebration
BSCS 601
Programming Language
Performance Task
You are tasked with creating a Python program to help plan a birthday celebration. The program will
prompt users to input estimated costs for five (5) different expense categories: venue, catering,
decorations, entertainment, and miscellaneous items. The program will then calculate the total
estimated cost and determine if it falls within a predefined budget.
CODE:
def get_cost(category):
while True:
try:
if cost < 0:
continue
return cost
except ValueError:
venue_cost = get_cost("Venue")
catering_cost = get_cost("Catering")
decorations_cost = get_cost("Decorations")
entertainment_cost = get_cost("Entertainment")
misc_cost = get_cost("Miscellaneous")
total_cost = 0
total_cost += venue_cost
total_cost += catering_cost
total_cost += decorations_cost
total_cost += entertainment_cost
total_cost += misc_cost
print("Budget: ${:.2f}".format(budget))
else: