Project Description
Background
In this project, students use Python to create a program that creates an order for Thanksgiving pies based on the number of people attending Thanksgiving dinner and how many votes each pie type receives. They will use functions, loop, if-else statements, and concatenation.
Your Task
In part 1, you will complete the following tasks:
- Ask for the number of people coming to Thanksgiving dinner
- Ask for three different pie options guests can choose from
- Ask for the number of votes for each pie type
- You will use 2 functions to do this
- An
update_pie
function will continually ask the user for the number of votes for each pie type until a viable value is found - A
check_votes
function will be used to check that the number of votes given is acceptable based on the number of people attending dinner
- An
- You will use 2 functions to do this
- Update the number of votes for each pie type as well as the number of total votes from guests
In part 2, you will complete the following tasks:
- Print out how many people voted
- If there are any unused votes, let the user know how many additional votes there were and that they will be added to the first pie choice
- Print the final order for each pie type
- A
pie_order
function will be used to return the number of pies to be ordered of each type
- If less than 3 people voted for a pie type, there will be 0 pies of that type ordered
- For every 8 people that voted for a pie type, an additional pie will be ordered (For example: If 7 people voted for pumpkin, 1 pie will be ordered. If 9 people voted for a pie, 2 will be ordered.)
- A