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
This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?
Gennadij [26K]

Answer:

The Proper codes in Line a and Line b is given below

average=Sum/3  

print (" Average is = ", average)

Explanation:

In the given question it calculated the sum but the program does not calculate the average of the 3 numbers.The average of the 3 number is calculated by using average=Sum/3   statement so we add this code in Line a then After that print the value of average by using the print function so we add this code in Line b.

4 0
2 years ago
Read 2 more answers
Which 2 problems does the Pay down credit card workflow solve for clients? (Select all that apply) It helps clients stay on top
Anna11 [10]

Answer:

B. It ensures that payments to credit card accounts are categorized correctly

D. It uses language that non-accountants can understand

Explanation:

Pay down credit card workflow is a new feature that makes entering records in QuickBooks easier for users. The two prime benefits of this workflow are;

1. It ensures that payments to credit card accounts are well categorized well. Without this feature, users most times find it difficult to enter records correctly or they tend to duplicate entries. This new feature obtains vital information that helps the software to correctly credit the accounts.

2. It uses language that non-accountants can understand. This simplifies the process and makes it easier for the user to enter the right data that would help the software to correctly credit the accounts.

3 0
1 year ago
What is the output of 1101 x 10 == 11000 + 10?
Marta_Voda [28]
== is an operator that returns a boolean if both operand are equal.

1101 * 10 is 11010

11000 + 10 is 11010


11010 == 11010

Thus the output would be True.
5 0
2 years ago
Allows you to manually add an entry to the arp cache that resolves the ip address inetaddr to the physical address etheraddr. wh
Norma-Jean [14]
The answer in this question is that once the Adaptor or router received the destination IP address (even if we entered in the incorrect MAC address) the router or adapter would remove the IP address from the Ethernet frame and using ARP, would get the correct MAC address of the destination.
6 0
2 years ago
Remember that ""state space"" refers to the space of all potential possibilities. Which dichotomous questions below will success
egoroff_w [7]

Answer:

Please check options are not given. Please check explanation for corrected version.

Explanation:

Options are not mentioned. Please post the complete question.

However, if "below" is removed, the question makes sense. I am taking it that way.

Dichotomous question means those questions which has two outcomes: true or false.

For the given condition, this is possible only if:

  • coin shows head and dice shows 1
  • coin shows head and dice shows 2
  • head, 3
  • head, 4
  • head, 5
  • head, 6
  • tails, and all above cases

However, each time, each mentioned condition should be strictly followed.

And fewer outcome than 1 is virtually or realistically impossible, as both coin and dice will roll out one outcome in any condition certainly.

7 0
2 years ago
Other questions:
  • ________ is used to undo unwanted database changes.
    15·2 answers
  • During which phase of web publishing would you use a text editor to enter codes that instruct the browser how to display webpage
    5·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • In a ____________________ attack, the attacker sends a large number of connection or information requests to disrupt a target fr
    14·1 answer
  • Look at the following array definition:
    11·1 answer
  • A security administrator is implementing a SIEM and needs to ensure events can be compared against each other based on when the
    11·1 answer
  • A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (1) Ou
    15·1 answer
  • Which two functions are provided to users by the context-sensitive help feature of the Cisco IOS CLI? (Choose two.)
    7·1 answer
  • Which of these are characteristics of a Python data type? Check all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!