Question: Please write this in Python. You and several friends decide to order some pizzas, and you agree to split the cost. It is assumed then
Please write this in Python.
You and several friends decide to order some pizzas, and you agree to split the cost. It is assumed then that each person will get a fair share of the purchase, so the problem is to figure out how many slices that is. The pizza slices must be divided as equally as possible, but slices will not be further cut into fractions. It is possible that some will get one more slice more than others, but the difference must never be more than one. You will be given the number of people involved, and the number of whole pizzas (where each pie is divided into eight slices. Determine how many slices each may get. How many people are sharing pizza? 5 How many pizzas will be ordered? 2 You will divide 16 slices -- 4 will have 3 and 1 will have 4 How many people are sharing pizza? 3 How many pizzas will be ordered? 1 You will divide 8 slices -- 1 will have 2 and 2 will have 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
