answer.
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
STALIN [3.7K]
2 years ago
14

In this question, you will experimentally verify the sensitivity of using a precise Pi to the accuracy of computing area. You ne

ed to perform the following activities with Python program:
a. Compute the area of a circle with radius 10 using Pi from the Python Math Module. Assign the area to a variable, say realA.
b. Now compute the area of the circle using the Pi value with precision 1,2, and 3 points after the decimal place. (i.e., Pi = 3.1, 3.14 & 3.141). Then Print the percentage difference between each of the areas calculated using each of these values of Pi and realA.

Computers and Technology
1 answer:
zhannawk [14.2K]2 years ago
4 0

Answer:

Follows are the code to this question:

import math as x #import math package

#option a

radius = 10#defining radius variable  

print("radius = ", radius)#print radius value

realA = x.pi * radius * radius#calculate the area in realA variable

print("\nrealA = ", realA)#print realA value

#option b

a1 = 3.1  * radius * radius#calculate first area in a1 variable  

print("Area 1= ", a1)#print Area

print("Percentage difference= ", ((realA - a1)/realA) * 100) #print difference  

a2 = 3.14  * radius * radius#calculate first area in a2 variable                            

print("Area 2= ", a2)#print Area

print("Percentage difference= ", ((realA - a2)/realA) * 100)#print difference  

a3 = 3.141  * radius * radius#calculate first area in a2 variable                       print("Area 3= ", a3)#print Area

print("Percentage difference= ", ((realA - a3)/realA) * 100) #print difference  

Output:

please find the attached file.

Explanation:

In the given Python code, firstly we import the math package after importing the package a "radius" variable is defined, that holds a value 10, in the next step, a "realA" variable is defined that calculate the area value.

In the next step, the "a1, a2, and a3" variable is used, which holds three values, that is "3.1, 3.14, and 3.141", and use the print method to print its percentage difference value.  

You might be interested in
Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
Delicious77 [7]

Answer:

a radio station

a newspaper

a television network

Explanation:

4 0
2 years ago
Read 2 more answers
Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of strings
Makovka662 [10]

The code that examines all the strings in the input source and determines how long the longest string (or strings are) is the following:

total = 0; % initial value is zero, in every while loop it will be incremented

while(input.hasNextInt()){

total += input.nextInt( );

}

7 0
1 year ago
Read 2 more answers
Someone claims that the big O notation does not make sense at all, and they give the following example. An algorithm A that proc
Svetllana [295]

Answer:

Big Oh notation is used to asymptotically bound the growth of running time above and below the constant factor.

Big Oh notation is used to describe time complexity, execution time of an algorithm.

Big Oh describes the worst case to describe time complexity.

For the equation; T(N) = 10000*N + 0.00001*N^3.

To calculate first of all discard all th constants.

And therefore; worst case is the O(N^3).

7 0
2 years ago
1. Used ____________ must be hot drained for 12 hours or crushed before disposal.
Pani-rosa [81]

Answer:

D). Oil Filter

A). Reduce, reuse, recycle.

A). True

Explanation:

1). 'Oil filters' must be crushed or hot drained for a minimum of 12 hours before disposal or recycling because the used motor oil proves to be a very hazardous waste and it can badly affect the environment if disposed of improperly. Thus, the government has made strict rules for its disposal properly.

2). 'Reduce, reuse, recycle' which is also known as three R's is effective in the management of waste in a shop. It helps in reducing the amount of waste and harm to the environment by reusing things and recycling them again will help in preventing exploitation of the resources and promote sustainable development.

3). The hazardous waste is disposed of in secure landfills or incinerators with the proper focus to ensure that the bedrock and groundwater table is not affected by it. It helps in preventing the environment from the potential harm that can be caused by such hazardous waste.

3 0
1 year ago
A customer states that when she removes the printed pages from her laser printer output tray, the black ink smears all over her
luda_lava [24]

Answer:

B. Fuser unit

Explanation:

Based on the scenario that is being described it can be said that the most likely problem is the Fuser unit. This is a part that plays an important role in the printing process. This unit melts the toner and compresses it in order to leave the impression on the paper with heat. A faulty fuser unit will not compress correctly and leave wet ink on the paper causing it to smear.

7 0
2 years ago
Other questions:
  • Which of the following is ideal for long distance communication ?
    5·1 answer
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    12·2 answers
  • A circuit contains three resistors connected in parallel. The value of R1 is 2 K , the value or R2 is 6 K , and the value of R3
    5·1 answer
  • When Jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor? machin
    11·1 answer
  • Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.
    5·1 answer
  • Jim is writing a program to calculate the wages of workers in a teddy bear factory.
    7·1 answer
  • Write a method named removeDuplicates that accepts a string parameter and returns a new string with all consecutive occurrences
    7·1 answer
  • A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
    13·1 answer
  • Prompt
    5·2 answers
  • How does Accenture help companies harness the power of data to achieve optimal business outcomes?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!