Answered You can hire a professional tutor to get the answer.

QUESTION

(Python exercise using while and for loops - no functions) Part 1: Pizza Party You are arranging a pizza party for all of your friends.

(Python exercise using while and for loops - no functions)

Part 1: Pizza Party

You are arranging a pizza party for all of your friends. You want to figure out how much pizza you can order without exceeding your budget. Assignment is to write a program that accepts the number of people attending your party, the budget for your party, the price per slice of pizza, and the price per pie of pizza. Your program should then identify how many slices each person wants and determine how many individual slices and pies to order without exceeding your budget. If you exceed your budget, the program should warn the user they can't place their order. Note that for the purpose of this program a pizza pie contains 8 slices. And note that the restaurant you are ordering from will not sell you more than 7 individual slices at a time (if you need to purchase 8 slices you will have to buy a whole pie).

You do not need to validate the first four input statements (total budget, cost per slice, cost per pie and # of people attending party). You will have to validate the user's input when prompting them for the number of slices for each person coming to the party (i.e. Enter number of slices for person #1).

Example input/output

Enter budget for
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question