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
4(x-9)=20<br> IWLL GIVE BRAINLIST AND THX
VladimirAG [237]

Answer:

x=14

Step-by-step explanation:

Let's solve your equation step-by-step.

4(x−9)=20

Step 1: Simplify both sides of the equation.

4(x−9)=20

(4)(x)+(4)(−9)=20(Distribute)

4x+−36=20

4x−36=20

Step 2: Add 36 to both sides.

4x−36+36=20+36

4x=56

Step 3: Divide both sides by 4.

4x

4

=

56

4

x=14

3 0
3 years ago
Read 2 more answers
Hi there I don't usually ask questions but I'm having a bit of trouble solving for X on this equation. 1+(3x-3)=1 You don't nece
Maksim231197 [3]

Answer:

1+3x-3=1

3x-3=0

3x=-3

x=-1

6 0
2 years ago
Read 2 more answers
6n-7=-(8n+7) what is the work and answer
Advocard [28]
6n-7=-8n-7
-7=-14n-7
-14=-14n
1=n
5 0
3 years ago
A rectangle has an area of 9 and 5/8 square cm. If the length of the rectangle is 3 and 1/2 cm, what is the width of the rectang
Natali5045456 [20]

Answer:

2 and 3/4 cm

Step-by-step explanation:    2 and 3/4 cm x 3 and 1/2 cm = the answer

5 0
3 years ago
Help ASAP I’ll<br> Mark you as brainlister
OLga [1]
Its 7.
Have a good day :)
6 0
3 years ago
Other questions:
  • Determine whether the given value is a statistic or a parameter.
    13·1 answer
  • Please me with this question.
    15·2 answers
  • Find the rate of change of the following problems
    9·1 answer
  • Kimberly has $80. She wants to purchase a school bag for $16 and several pairs of shoes. Each pair of shoes is $8. Write an ineq
    11·2 answers
  • A research report claims that mice with an average life span of 32 months will live to be about 40 months old when​ 40% of the c
    6·1 answer
  • the diameter D of a sphere is 13m calculate the sphere volume V use the value 3.14 round your answer to the nearest tenth
    14·1 answer
  • I NEED HELP WITH THIS
    7·1 answer
  • Whos prettier? doja cat or megan thee stallion
    8·2 answers
  • Can y’all help me on question 30?!
    14·1 answer
  • Find the area of the triangle with height (x+8) and base (2x+4). (A=1/2bh)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!