1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rudiy27
4 years ago
14

oe’s Pizza Palace needs a program to calculate the number of slices a pizza of any size can be divided into. The program should

perform the following steps: Ask the user for the diameter of the pizza in inches. Calculate the number of slices that may be taken from a pizza of that size. Display a message telling the number of slices. To calculate the number of slices that may be taken from the pizza, you must know the following facts: Each slice should have an area of 14.125 square inches.To calculate the number of slices, simply divide the area of the pizza by 14.125.The area of the pizza is calculated with this formula: Area = "pi r squared" where pi is approximately 3.14159 and r is the radius (half the the diameter). To calculate the number of slices that may be taken from the pizza, you must know the following facts: Each slice should have an area of 14.125 square inches. To calculate the number of slices, simply divide the area of the pizza by 14.125. The area of the pizza is calculated with this formula: Area = "pi r squared" where pi is approximately 3.14159 and r is the radius (half the the diameter).

Mathematics
1 answer:
Shkiper50 [21]4 years ago
4 0

Answer:

# the user is prompted to enter diameter in inch

diameter = int(input("Enter the diameter of the pizza you want (in inch): "))

# the value of PI is saved as a constant

PI = 3.14159

# the area of the pizza is calculated using pi r squared

# the value of r is diameter divide by 2

area = PI * ((diameter / 2) ** 2)

# the value of area is displayed

print(area)

# the number of slice is calculated as area divide by 14.125

# integer division is use to get number of slice

number_of_slice = area // 14.125

# the number of slice is displayed to the user

print("Your number of pizza slice is: ", number_of_slice)

Step-by-step explanation:

The code is written in python and well commented. A sample image of output when code is executed is attached

You might be interested in
Carrie saved money to spend while on a one-month vacation to Europe. On day 8, she had $2,400 remaining. On day 16, she had $1,6
garik1379 [7]

If this is represented by a linear function, then we know that the amount of money decreases at an unchanging amount. Knowing this, and knowing that on day 8, she had 2400, we simply just add 2400 to 8 100's:

2400 + 8*100 = 2400 + 800

Carrie initially had $3200, or Option C.


6 0
3 years ago
Read 2 more answers
Vhich expression is equivalent to 16^3
LenKa [72]

Answer:16×16×16

Step-by-step explanaution:

16 ^3 so that means you need to but 16 3 times

6 0
3 years ago
Listed below are measured amounts of caffeine? obtained in one can from each of 14 brands. Find the? range, variance, and standa
Makovka662 [10]

Answer:

00343434454151553647410053543804147

Step-by-step explanation:

6 0
3 years ago
X^3-3x^2+x-2=0 how much should x be? And how do you get the answer?
irina [24]
2.89
Graph each side of the equation. The solution is the x-value or the point intersection.
5 0
3 years ago
Please help me solve this 6 1/4 to the square root of 6 1/4
lys-0071 [83]
25/4 that is the answer
3 0
3 years ago
Read 2 more answers
Other questions:
  • If (5x^4)(2x^6)=ax^b, what is the value of a-b?
    9·2 answers
  • A(n) in the money supply will cause interest rates to decrease, which, in
    12·1 answer
  • Find the quotient 4298 divided by 4
    14·2 answers
  • I have two bags. Bag 1 contains 10 blue marbles, while Bag 2 contains 15 blue marbles. I pick one of the bags at random, and thr
    5·1 answer
  • A pan of brownies is 7/10 full. Tyreese buys 2/5 of the brownies. What fraction of a whole pan of brownies does Tyreese buy?
    7·1 answer
  • Which conversion factor below you can use to convert gallons to pints?
    6·1 answer
  • A caterer is preparing meals for a party of 78 guests. If about 1/4 of the guests want steaks, about how many steaks should the
    11·1 answer
  • Rectangle A has a side length of 6 cm and 3.5 cm. The side length of rectangle B are proportional to the side lengths of a recta
    11·1 answer
  • The convex polygon below has 6 sides. Find the value of x.
    14·1 answer
  • Can some one help me with this ?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!