Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This function expects the input number as an argument and returns the estimate of its square root. The program should also include a main function that allows the user to compute the square roots of inputs from the user and python's estimate of its square roots until the enter/return key is pressed.An example of the program input and output is shown below:Enter a positive number or enter/return to quit: 2 The program's estimate is 1.4142135623746899 Python's estimate is 1.4142135623730951 Enter a positive number or enter/return to quit: 4 The program's estimate is 2.0000000929222947 Python's estimate is 2.0 Enter a positive number or enter/return to quit: 9 The program's estimate is 3.000000001396984 Python's estimate is 3.0 Enter a positive number or enter/return to quit

Answers

Answer 1
I’m confused what are you asking
Answer 2

The python program that calculates the volume and the square of the volume is as follows

radius = float(input("Radius: "))

volume = (4.0/3.0) * (22.0/7.0) * radius**3

sqrtVolume = volume**0.5

print(f'The volume is {volume} units cubed')

print(f'The square root of that number is {sqrtVolume}')

How to write the program?

The complete program written in Python where comments are used to explain each line is as follows

This gets the radius

radius = float(input("Radius: "))

#This calculates the volume

volume = (4.0/3.0) * (22.0/7.0) * radius**3

#This calculates the square root of the volume

sqrtVolume = volume**0.5

#This prints the volume

print(f'The volume is {volume} units cubed')

#This prints the square root of the volume

print(f'The square root of that number is {sqrtVolume}')

Therefore, The python program that calculates the volume and the square of the volume is as follows

radius = float(input("Radius: "))

volume = (4.0/3.0) * (22.0/7.0) * radius**3

sqrtVolume = volume**0.5

Read more about python programs at

brainly.com/question/26497128

#SPJ2


Related Questions

What is a good slogan for digital citizenship?

Answers

Answer:

No matter where you are in the world you have a place to go to

Explanation:

In this world of globalization it makes sense you would be anywhere in the world and still have a place to go to.

Answer:

"If you are on social media, and you are not learning, not laughing, not being inspired or not networking, then you are using it wrong."

Explanation: (this is the freedom of speech not my words.) but there true even though and that we all (i dont know if its everyone but y'know) have to stay inside during this pandemic try to make the most of it!  

What would a bar graph best be used for? State why and give 2-3 examples of things you could demonstrate with a bar graph.

Answers

Answer:

Reasons what bar graph is used for.

Explanation:

Bars are shown to compare and contrast data in a bar graph. For example, a data was collected through survey of average rainfall. It represents many unique categories by having many different groups. Those groups are plotted on the x-axis and on the y-axis, the measurements are plotted, like inches.

Hope this helps, thank you !!

State whether the data described below are discrete or​ continuous, and explain why. The durations of movies in seconds

Answers

Answer:

the data are continuous because the data can take any value in an interval.

Write a java program for the following
A student will not be allowed to sit in exam if his/her attendance is less than 75% .
Take the following input from user
Number of classes held
Number of classes attended
And print
Percentage of class attended
Is student allowed to sit in exam or not .

Answers

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

 

 Scanner input = new Scanner(System.in);

 

 int classesHeld, classesAttended;

 double percentage;

 

 System.out.print("Enter number of classes held: ");

 classesHeld = input.nextInt();

 

 System.out.print("Enter number of classes attended: ");

 classesAttended = input.nextInt();

 

 percentage = (double) classesAttended / classesHeld;

 

 if(percentage < 0.75)

     System.out.println("You are not allowed to sit in exam");

 else

     System.out.println("You are allowed to sit in exam");

}

}

Explanation:

Import the Scanner to be able to get input from the user

Create a Scanner object to get input

Declare the variables

Ask the user to enter classesHeld and classesAttended

Calculate the percentage, divide the classesAttended by classesHeld. You also need to cast the one of the variable to double. Otherwise, the result would be an int

Check the percentage. If it is smaller than 0.75 (75% equals 0.75), print that the student is not allowed. Otherwise, print that the student is allowed

Write a program that calculates the occupancy rate for a hotel. The program should start by asking the user how many floors the hotel has. A for loop should then iterate once for each floor. In each iteration of the for loop, the program should ask the user for the number of rooms of the floor and how many of them are occupied. After all of the iterations are complete the program should display how many rooms the hotel has, how many of them are occupied, and the percentage of rooms that are occupied.

Answers

Answer:

In Python:

floor = int(input("Number of floors: "))

totalrooms = 0

totaloccupied = 0

for i in range(floor):

   rooms = int(input("Rooms in floor "+str(i+1)+": "))

   occupied = int(input("Occupied Rooms in floor "+str(i+1)+": "))

   totalrooms = totalrooms + rooms

   totaloccupied = totaloccupied + occupied

   

print("Total Rooms: "+str(totalrooms))

print("Total Occupied: "+str(totaloccupied))

print("Percentage Occupied: "+str(round(100*totaloccupied/totalrooms,2))+"%")

Explanation:

This line prompts the user for number of rooms

floor = int(input("Number of floors: "))

This line initializes totalrooms to 0

totalrooms = 0

This line initializes totaloccupied to 0

totaloccupied = 0

This iterates through the floors

for i in range(floor):

This gets the number of rooms in each floor

   rooms = int(input("Rooms in floor "+str(i+1)+": "))

This gets the number of occupied rooms in each floor

   occupied = int(input("Occupied Rooms in floor "+str(i+1)+": "))

This calculates the total number of rooms

   totalrooms = totalrooms + rooms

This calculates the total number of occupied rooms

   totaloccupied = totaloccupied + occupied

   

This prints the total number of rooms

print("Total Rooms: "+str(totalrooms))

This prints the total number of occupied rooms

print("Total Occupied: "+str(totaloccupied))

This prints the percentage of occupied rooms to 2 decimal places

print("Percentage Occupied: "+str(round(100*totaloccupied/totalrooms,2))+"%")

I need help I would really appreciate it

Answers

Answer:

Checks if it is a multiple of 3 and 5

Explanation:

Its an if statement using modulus division to check for a remainder. It checks if a number is a multiple of 3 AND 5. (&& and & both mean and in Java).

If the remainder of both is 0 then that means the mystery number is a multiple of both 3 and 5.

You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected personal questions about yourself. What can you conclude about this procedure and how it may increase your security?

Answers

Answer:

The questions are used to secure and identify you furthermore. Answering personal questions that only you can answer will deter someone from hacking into your account that easily.

Explanation:

when food material are preserved at a temperature just above freezing the temperature process is called​

Answers

It’s freezing. The process is called freezing

Compression algorithms vary in how much they can reduce the size of a document.
Which of the following would likely be the hardest to compress?
Choose 1 answer:

A. The Declaration of Independence

B. The lyrics to all of the songs by The Beatles

C. A document of randomly generated letters

D. A book of nursery rhymes for children

Answers

b the lyrics to all of the songs by the beatles !

The statement that represents the thing that would likely be the hardest to compress is a document of randomly generated letters. Thus, the most valid option for this question is C.

What is an Algorithm?

An algorithm may be characterized as a type of methodology that is significantly utilized for solving a problem or performing a computation with respect to any numerical problems.

According to the context of this question, an algorithm is a set of instructions that allows a user to perform solutions with respect to several numerical and other program-related queries. It can significantly act as an accurate list of instructions that conduct particular actions step by step in either hardware- or software-based routines.

Therefore, the statement that represents the thing that would likely be the hardest to compress is a document of randomly generated letters. Thus, the most valid option for this question is C.

To learn more about Algorithms, refer to the link:

https://brainly.com/question/24953880

#SPJ3

What should Stephan do to improve his study environment? Check all that apply. remove distracting technology have easy access to his study resources ask his parents to leave the room leave some food and drink for snacks while studying allow his dad to stay only if he is helping with studying remove all food and drink from the room​

Answers

Answer:

I. Remove distracting technology.

II. Have easy access to his study resources.

III. Allow his dad to stay only if he is helping with studying.

Explanation:

A study environment can be defined as a place set aside for reading and studying of educational materials.

In order to facilitate or enhance the ability of an individual (student) to learn and assimilate information quickly, it is very important to ensure that the study environment is devoid of any form of distraction and contains the necessary study materials (resources).

Hence, to improve his study environment, Stephan should do the following;

I. Remove distracting technology such as television, radio, games, etc.

II. Have easy access to his study resources. Stephan shouldn't keep his study materials far away from his study area.

III. Allow his dad to stay only if he is helping with studying.

Answer:the person above it right

Explanation:

2. You are developing a new application that optimizes the processing of a warehouse’s operations. When the products arrive, they are stored on warehouse racks. To minimize the time it takes to retrieve an item, the items that arrive last are the first to go out. You need to represent the items that arrive and leave the warehouse in a data structure. Which data structure should you use to represent this situation?
a) array
b) linked list
c) stack
d) queue

Answers

Answer:

Option d) is correct

Explanation:

To optimize the processing of a warehouse’s operations, products are stored on warehouse racks when they arrive. The items that arrive last are the first to go out to minimize the time it takes to retrieve an item. The items that arrive need to be represented and the warehouse should be left in a data structure. The data structure which should you use to represent this situation is a queue.

Option d) is correct

Write VHDL code for the circuit corresponding to an 8-bit Carry Lookahead Adder (CLA) using structural VHDL (port maps). (To be completed before your lab session.)

Answers

Answer:

perdo si la pusiera es español te ayudo pero no esta en español

A marketing plan includes a number of factors, including the marketing mix.
What is the marketing mix?
A. The variables of product, price, place, and promotion
B. Using names and symbols to ideny the company's products
C. How the company intends for customers to view its product
relative to the competition
D. A plan for spending money
SUBMIT

Answers

A marketing plan includes a number of factors, including the marketing mix.
What is the marketing mix?
A. The variables of product, price, place, and promotion

Wilma is looking for facts about social media for her research project. What fact should she use for her project?

1: Communicating with social media is hard
2: Social media is a great way to communicate.
3: Social media is fun and easy to use.
4:The minimum age for some social media sites is 13.

Answers

the fact she should use for her project is number 4 because that’s the only fact, the rest are opinions!

Which of these is NOT a mathematical operator used in Python?

A. !
B. /
C. %
D. *

Answers

the answer is A. i wouldn’t seen any mathematical question that has to do with “!”

Which elements of text can be changed using automatic formatting? Check all that apply.
A) smart quotes
B) accidental usage of the Caps Lock key
C) fractions
D) the zoom percentage
E) the addition of special characters ​

Answers

A) smart quote and B) the zoom percentage and E) the addition of special characters

Answer:a, d, e

Explanation:

Write a program that reads in an integer and breaks it into a sequence of individual digits. For example, the input 16384 is displayed as 1 6 3 8 4 Make sure the input has no more than five characters and is not negative. (You don’t have to do this through code) Just make sure you enter correct data when running the program.

Answers

Answer:

Here you go :)

Explanation:

(This also works for strings as well)

usr = input("Enter a number: ")

usr = list(usr)

for n in range(len(usr)):

   print(usr[n], end= " ")

The program that reads in an integer and breaks it into a sequence of individual digits is in the explanation part.

What is programming?

Programming tasks include analysis, algorithm generation, algorithm accuracy and resource consumption profiling, and algorithm implementation.

Computer programming is the process of writing code that instructs a computer, application, or software program on how to perform specific actions.

Here is a Python program that reads in an integer and breaks it into a sequence of individual digits:

num = input("Enter a positive integer with no more than five digits: ")

if num.isdigit() and len(num) <= 5:

   for digit in num:

       print(digit, end=' ')

else:

   print("Invalid input!")

Thus, this program first prompts the user to enter a positive integer with no more than five digits.

For more details regarding programming, visit:

https://brainly.com/question/11023419

#SPJ2

Create a flowchart that assigns a counselor to a student.
You need to ask a student for the first letter of his/her last name. Assign a counselor based on the following criteria:
A through M are assigned to Ms. Jones
N through Z are assigned to Mr. Sanchez

Answers

Please Help! Unit 6: Lesson 1 - Coding Activity 2
Instructions: Hemachandra numbers (more commonly known as Fibonacci numbers) are found by starting with two numbers then finding the next number by adding the previous two numbers together. The most common starting numbers are 0 and 1 giving the numbers 0, 1, 1, 2, 3, 5...
The main method from this class contains code which is intended to fill an array of length 10 with these Hemachandra numbers, then print the value of the number in the array at the index entered by the user. For example if the user inputs 3 then the program should output 2, while if the user inputs 6 then the program should output 8. Debug this code so it works as intended.

The Code Given:

import java.util.Scanner;

public class U6_L1_Activity_Two{
public static void main(String[] args){
int[h] = new int[10];
0 = h[0];
1 = h[1];
h[2] = h[0] + h[1];
h[3] = h[1] + h[2];
h[4] = h[2] + h[3];
h[5] = h[3] + h[4];
h[6] = h[4] + h[5];
h[7] = h[5] + h[6];
h[8] = h[6] + h[7]
h[9] = h[7] + h[8];
h[10] = h[8] + h[9];
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
if (i >= 0 && i < 10)
System.out.println(h(i));
}
}

Subtract 01101011-00101010

Answers

Answer:

Alexa says minus 8

Explanation:

lmaao it actually gives an answerr

It took her 9 more months but Marina has managed to save the full $725 plus more to cover fees to pay off the pay-day loan company. However, she forgot to account for the interest that had been compounding over time. Consider it is now 275 days later, the remaining loan was $725 and the APR is 47% compounded daily.

What is the total amount that Marina must now pay in order to pay off her the loan, accounting for interest?

What is the total amount of interest paid (not including fees)?

Answers

Answer:

she loaned 750 dollars.

it took her 9 months to repay it.

it was 275 days since she took out the loan.

the interest rate was 47% per year compounded daily.

the daily interest rate would be 47% / 365 / 100 = .0012876712 per day.

this assumes 365 days in a year, which is the standard assumption that i know of.

the future value of 750 for 275 days would be based on the formula of f = p * (1 + r) ^ n

f is the future value

p is the present value

r is the interest rate per time period (days in this case)

 

n is the number of time periods (days in this case).

the formula becomes:

f = 750 * (1 + .0012876712) ^ 275

solve for f to get:

f = 1068.440089.

that's the future value of the loan.

it's what she owes.

the interest rate on the loan is that value minus 750 = 318.440089.

that's how much extra she needs to pay in addition to whatever fees she was charged.

who likes tom holland as spiderman and his web shooter tippets when he swings off buildings in new york city midtown, Forest Hills and he is a superhero and I am his humongous fan of spiderman or peter parker the spider man

Answers

Answer:

YESSSS!!!!

Explanation:

Answer:

ayo no spikar english :u

Write a class called Dragon. A Dragon should have a name, a level, and a boolean variable, canBreatheFire, indicating whether or not the dragon can breathe fire. The class should have getter methods for all of these variables - getName, getLevel, and isFireBreather, respectively.

Answers

Answer: A dragon name could be name Holls and at level 14 and can breathe fire

Explanation:

I need help for my computer science class I would appreciate it

Answers

Answer:

21

Explanation:

a = 7

b = 7

c = 2

7 is greater than or equal to 7 , so it will return 7 + 7 *2 which is 21

What are the WORST computer malware in your opinion it can be worms backdoors and trojans I just want a input, nothing right or wrong

Answers

Answer:

I think probably mydoom

Explanation:

as it estimated 38 billion dollars in damage, also this malware is technically a worm

A student will not be allowed to sit in exam if his/her attendance is less than 75% .
Take the following input from user
Number of classes held
Number of classes attended
And print
Percentage of class attended
Is student allowed to sit in exam or not .

Answers

Answer:

Sorry, this is too vague to understand as you don’t have any charts, graphs, or anything

Explanation:

Which statements about editing an existing Contact in Outlook are true? Check all that apply.

Double-click a contact to open the editing page.
Right-click a contact and click Edit to open the editing page.
Click the Edit link in the Contact Information page to open the editing page.
Contacts can be edited in the body of an email message.
Existing fields can be edited for a Contact in the editing page.
New fields can be added for a Contact on the editing page.

Answers

Answer:

Double-click a contact to open the editing page.

Right-click a contact and click Edit to open the editing page.

Click the Edit link in the Contact Information page to open the editing page.

Existing fields can be edited for a Contact in the editing page.

New fields can be added for a Contact on the editing page.

Explanation:

just did it

The following statements should be considered for editing into an existing contact in Outlook:

Double click the contact in order to open the editing page.Right-click the contact & click on edit to open the editing page.Click on the edit link in the page of contact information for editing the page.The fields that are existed could be altered for a contact in an editing page.The new fields for the contact on the editing page could be added.

The following information should be relevant:

The Contact & editing page is important.Contacts can't be added to the body of the email message.

Therefore we can conclude the above statements should be considered for altering an existing contact in outlook.

Learn more about the outlook here: brainly.com/question/20494929

Write a program which will enter information relating to a speeding violation and then compute the amount of the speeding ticket. The program will need to enter the posted speed limit, actual speed the car was going, and whether or not the car was in a school zone and the date of the violation. Additionally, you will collect information about the driver (see output for specifics). The way speeding tickets are computed differs from city to city. For this assignment, we will use these rules, which need to be applied in this order:

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 float speedlimit, actualspeed;

 String ddate;

 int schoolzone;

 System.out.print("Speed Limit: ");

 speedlimit = input.nextFloat();

 System.out.print("Actual Speed: ");

 actualspeed = input.nextFloat();

 System.out.print("Date: ");

 ddate = input.nextLine();

 System.out.print("School Zone (1-Yes): ");

 schoolzone = input.nextInt();

 float ticket = 75;

 ticket += 6 * (actualspeed - speedlimit);

 

 if(actualspeed - speedlimit > 30){

     ticket+=160;

 }

 if(schoolzone == 1){

     ticket*=2;

 }  

 System.out.print("Date: "+ddate);

 System.out.print("Speed Limit: "+speedlimit);

 System.out.print("Actual Speed: "+actualspeed);

 System.out.print("Ticket: "+ticket);

}

}

Explanation:

See attachment for complete program requirements

This declares speedlimit and actualspeed as floats

float speedlimit, actualspeed;

This declares ddate as string

 String ddate;

This declares schoolzone as integer

 int schoolzone;

This prompts the user for speed limit

 System.out.print("Speed Limit: ");

This gets the speed limit

 speedlimit = input.nextFloat();

This prompts the user for actual speed

 System.out.print("Actual Speed: ");

This gets the actual speed

 actualspeed = input.nextFloat();

This prompts the user for date

 System.out.print("Date: ");

This gets the date

 ddate = input.nextLine();

This prompts the user for school zone (1 means Yes, other inputs means No)

 System.out.print("School Zone (1-Yes): ");

This gets the input for schoolzone

schoolzone = input.nextInt();

This initializes ticket to $75

 float ticket = 75;

This calculates the additional cost based on difference between speed limits and the actual speed

 ticket += 6 * (actualspeed - speedlimit);

If the difference between the speeds is greater than 30, this adds 160 to the ticket  

 if(actualspeed - speedlimit > 30){

     ticket+=160;

 }

If it is in a school zone, this doubles the ticket

 if(schoolzone == 1){

     ticket*=2;

 }  

The following print the ticket information

 System.out.print("Date: "+ddate);

 System.out.print("Speed Limit: "+speedlimit);

 System.out.print("Actual Speed: "+actualspeed);

 System.out.print("Ticket: "+ticket);

A broadband connection is defined as one that has speeds less than 256,000 bps.
Question 25 options:
True
False

Answers

Answer:

A typical broadband connection offers an Internet speed of 50 megabits per second (Mbps), or 50 million bps.

Explanation:

I think I got it right, plz tell me if im wrong

Changing the color of the text in your document is an example of

Answers

Answer:

???????????uhhh text change..?

Explanation:

Answer:

being creative

Explanation:

cause y not?

When using the Mirror command you can delete the source object as the last step of the command. True or false

Answers

Answer:

The anwser is true it is true.

Other Questions
do heterotrophs perform photosynthesis The proper dosage of a certain medication is 0.50 mg per kilogramof of patient weight. The medication is the Spence in a liquid that contains 350.0ug of medication per mL of liquid. What volume of liquid medication should be given to a 183 Ib patient. (1kg= 2.204 lb) Fill in the blank with the correct German form. Nach ____ Bluse ziehe ich mir die Jacke an. die das der dem A car with a mass of 2000 kg and a boat with a mass of 500 kg are both moving at the same speed.What is the ratio of the kinetic energy of the car to the kinetic energy of the boat?A. 2:1B. 4:1C. 9:1D. 16:1 WILL GIVE BRAINLIESTASAP HELP How did Democrats and Whigs differ about who should be allowed to vote?A Republicans sought to extend the vote to all free, white men, while the Whigs wanted to preserve property requirements.B Democrats sought to extend the vote to all free, white men, while the Whigs wanted to preserve property requirements.C Whigs and democrats sought to extend the vote to all free, white men, while the Whigs wanted to preserve property requirements.D Democrats sought to extend the vote to all free, white men, while the Republicans wanted to preserve property requirements. One risk factor you cannot control is your 5. How might an effective vaccine given to a large percentage of the population during apandemic change the pandemic's outcome? Support your claim(s) using evidence from Table 1 Help me, please!!!!!!! June is a district attorney. One of the police officers she works with told her that he searched a residence without a search warrant. Which of the following reasons makes this search legal? A. The officer told the resident she had no choice so she allowed the officer inside. B. The resident was not the legal owner of the house so the officer did not need permission to enter. C. There were pills clearly visible on the table but the officer was not sure if they were illegal drugs. D. The officer heard someone call for help inside the residence. Find the mean of the data in the dot plot below. (2t2 - 36t + 162). - (t-9) Is the following statement true or false:It takes the same amount of time for the moon to rotate on its axis as it takes it to complete a revolution around the earth. I'LL GIVE BRAINLIEST Explain at least two developments of the Industrial Revolution that caused aswitch from handmade garments to mass produced Ready-to-wear clothes. Which is the complete factored form of 2 x 3 - 10 x22x+10? How does information travel during transcription?a) RNA to amino acidb) DNA to amino acidc) DNA to RNAd) RNA to DNA Full meaning of OPEC Which color of light does a green object absorb? Give two examples of precedents Washington set during his presidency.Name one trait that Washington had, and provide an example.Write an additional interesting fact about Washington. what tribe was sacagawea in?