def hotdogs(teran, jasmin): """ Returns the number of hotdogs required for the party. Parameters: teran -- the number of hotdogs teran will eat jasmin -- the number of hotdogs jasmin will eat """ chris = 2 * jasmin brenda = chris - 1 grace = (brenda+1)//2 + 1 # add 1 to brenda to round up total_hotdogs = teran + jasmin + chris + brenda + grace return total_hotdogs def soda(num_people): """ Returns the number of sodas required for num_people """ return 2 * num_people def bbq_cost(teran, jasmin, num_people): """ Calculates the total cost of the BBQ """ soda_cost = 0.5 hotdog_cost = 0.75 num_hotdogs = hotdogs(teran, jasmin) num_sodas = soda(num_people) return num_sodas * soda_cost + num_hotdogs * hotdog_cost def bbq_plan(teran, jasmin, num_people): """ Prints out the plan for the BBQ """ print("We need to buy " + str(hotdogs(teran, jasmin)) + " hotdogs") print(" and " + str(soda(num_people)) + " sodas for a total") print(" cost of $" + str(bbq_cost(teran, jasmin, num_people)))