Question
Overall Problem must be solved in basic python You and several friends decide to order some pizzas, and you agree to split the cost. It
Overall Problem must be solved in basic 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.
Hint: The simplest solution would use 5 different arithmetic operators, once each.
Sample Interfaces
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started