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
tankabanditka [31]
3 years ago
7

3.18: Pizza Pi Joe’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 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).
Computers and Technology
1 answer:
alina1380 [7]3 years ago
6 0

Answer:

#program in python.

#variables

slice_area=14.125

pi=3.14159

#read diameter

d=int(input("Enter diameter of pizza:"))

#area of pizza

area=pi*(d/2)*(d/2)

#number of slice

no_slice=int(area/slice_area)

#print slice

print("total silce are:",no_slice)

Explanation:

Declare and initialize a variable "slice_area" with 14.125 which is the area of a pizza slice.Initialize a variable "pi" with 3.14159.Then read the diameter of pizza.Find the area of pizza as "area=pi *d/2*d/2".Divide the total area with area of pizza slice.This will be the number of slice.

Output:

Enter diameter of pizza:20                                                                                                

total silce are: 22

You might be interested in
How to achieve competitive advantage using information systems models
Maurinko [17]

Information systems can achieve competitive advantage by engaging in:

  • Lowering costing.
  • Boasting differentiation of their product.
  • Changing Their competitive scope.

<h3>What is competitive advantage?</h3>

Competitive advantage is known to be that  factors that helps a firm to produce goods or services better or relatively more cheaply than their counterparts.

Note that in the case above, Information systems can achieve competitive advantage by engaging in:

  • Lowering costing.
  • Boasting differentiation of their product.
  • Changing Their competitive scope.

Learn more about competitive advantage from

brainly.com/question/14030554

#SPJ12

4 0
2 years ago
¿cuales son la diferencias de programacion estructurada y programacion orientada a objetos?
Arturiano [62]

Answer:

La programación estructurada está diseñada para enfocarse en el proceso / estructura lógica y luego en los datos requeridos para ese proceso. La programación orientada a objetos está diseñada para centrarse en los datos. ... La programación orientada a objetos admite herencia, encapsulación, abstracción, polimorfismo

Explanation:

5 0
3 years ago
What is a data type?
kvasek [131]

Answer:

Data type is an attribute of the data in the computer science. It basically guide the compiler and interpreter about the data utilization in the program. Data type basically define the operation, which can be done on given data.

There are different types of data types are as follow:

Integer data type: This type if data type basically represent the integer type of data value from largest to smallest order.

For example: int p = 10;

Real data type: This type of data type is used to represent the real type of number from largest to smallest range.

For example: float b = 17.6;

7 0
3 years ago
Write short note on points to consider while using attributes with the tags.​
ASHA 777 [7]

Answer:

Explanation:

Tags are used to display the content but what about the specifics of that content like if a lik should open ina window or the location of an image .Attributes are used to specify things like this regarding the content on your webpages.Attributes are located within tags.Attributes are located in start tag only,not in end tags.

7 0
3 years ago
Question 3Consider the following statement:ptrMemberVarType objectThree(objectOne);The values of the member variables of objectO
juin [17]

Answer:

Memberwise Initialization.

Explanation:

The initialization of the objectOne member variables will be transferred to the equivalent objectThree members variable. Such initialization is identified as the Memberwise Initialisation.

In it, each data member of such an object to the right of the assigning operator are allocated independently towards that identical data member of the object to the left of that assignment operator.

7 0
3 years ago
Other questions:
  • Why should spain go to Africa ​
    15·1 answer
  • Is a small file that a web server writes to the disk drive of the client computer, containing information about the user?
    8·1 answer
  • Assume that the myname.txt file is currently closed. write the code segment that opens the file without erasing it, write anothe
    13·1 answer
  • Which of the following is not a responsibility of a member of society?
    14·1 answer
  • What is virtual office?
    11·1 answer
  • Earthquakes happen when _____.
    12·1 answer
  • Draw a flowchart diagram for a program that display a person's name x times​
    5·1 answer
  • Carl wants to add two new characters to the extraterrestrial battleship game he's
    15·1 answer
  • How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
    6·1 answer
  • Petra notices that there are a number of issues with a new fiber optic connection whose status appears to be going up and down c
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!