CMPSC 101 class i Need to program this problem using python 3.4.3.
this is what i have so far
people= int(input("How many people are sharing?"))
pizza_pie = int(input("How many pizzas will be ordered?"))
pizza_slice= pizza_pie *8
remainder= pizza_slice % people
Less= people- remainder
am i doing this right?
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.
Hint: The simplest solution would use 5 different arithmetic operators, once each.
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.
Recently Asked Questions
- How does a regression plane differ from a regression line? A.A regression plane can represent a bivariate regression model through a hyperplane and the
- Atom Company just began business and made the following four inventory purchases in June: June 1 150 units $ 825 June 10 200 unit 1,120 June 15 200
- Identify one trait which was not present (or minimally present) in Wangari Muta Maathai's the lecture of her nobel prize acceptance speech and suggest a way to