Question: # TODO 0 : Import math and random, or just the functions you need from those modules # get _ num _ people Parameters: none

# TODO 0: Import math and random, or just the functions you need from those modules
# get_num_people
Parameters: none
Return: should generate and return the number of people
Side effect: should print the number of people
def get_num_people():
guest =0-# TODO 1: generate a random number between 2 and 10(inclusive)
print() # TODO 2: print how many people you're inviting
return guest
# restaurant_choice
# Parameters: isVegetarian, isVegan, isGlutenFree
# Return: should return the food price
# Side effect: should display only the restaurants to which you may take the group based
on the dietary restrictions
def restaurant_choice(s1, s2, s3):
# TODO 3: write if-statements based on which restaurant that will set food price to the a
ppropriate value
# TODO 4: print the list of the restaurants with number for the user to select
# TODO 5: print the message for the user to select number and store the number to select
select = input ()
# TODO 6: call restaurant_food_price() function that will return the dish_price of the re
staurant
return dish_price
# restaurant_food_price
# Parameters: user's choice
# Return: should choose and return the price of one five restaurants
# Side effect: should print the food price for the selected restaurant
def restaurant_food_price(select):
# TODO 7: write if-statements based on restaurant that will set the food price to the app
ropriate value
# TODO 8: print the food price to the screen
print()
return price
# calculate_discount
# Parameters: no_of_guest
# Return : total discount percent, in decimal form.
0.2.
# If the no_of_guest is 5 or more people, 20% discount, and should be returned as
def calculate_discount(no_of_guest):
pass
# TODO 9: write if-statements to return 20% discount if it's 5 ore more. And, print "Wow,
you have many friends!".
# No discount for 2-4 people.
# print_receipt
# Parameters: original_total, discount
# Return: none
# Side effect: prints a summary of the bill and discount savings
def print_receipt(original_total, discount):
human_readable_discount = discount;
# TODO 10: Generate the human-readable discount from the discount variable,
# e.g.0.2 should be 20, to print a 20% discount
discount_price = original_total ** discount
total = original_total - discount_price
# TODO 11: Fix the formatting of the summary below to print exactly 2 decimal places for
each number
# TODO 12: Check the output and make sure that it makes sense. If not, it means there are
bugs still in the code.
print("
")
print("****** CUSTOMER BILL SUMMARY ******")
print("Subtotal: \t \t $ ", original_total, sep="")
print(human_readable_discount, "% Discount: \t ??t-$, discount, sep="")
print("TOTAL AFTER DISCOUNT ??t??t,$, total, sep="")
print("You Saved ??t??t??t,$, discount, sep="")
 # TODO 0: Import math and random, or just the functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!