subject

Have you ever used an owner’s manual to figure out how to operate something that you had just purchased? Well, Python has an owner’s manual. It’s called The Python Standard Library. This is sometimes referred to as “Python documentation.” It’s a great resource because it tells you everything you could ever want or need to know about Python. (This also makes it a little intimidating!)

In this lab, you are going to use the Python Standard Library to find and use a function in the math module.

Just like the random module and the time module that we have used, the math module is a set of functions that you can import into your code so that you can—you guessed it!—code some math functions more easily.

For example, the square root of a number is the answer to this question: What can I multiply by itself to get a certain number? For example, if you want to know the square root of 25, you are asking, “What number do I multiply by itself to get 25?” The answer to that is 5, since 5 x 5 equals 25.

Being able to find the square root can be very helpful. Imagine that you have 25 one-foot-long square floor tiles and you want to know how much of the floor they can cover. The answer is 5 square feet! Or, imagine that you are excitedly planning on moving into your college dorm room when you find out that it is 100 square feet. That might sound big…until you determine the square root and notice that you have a 10 x 10-foot room…which is not so big after all!

You can click on this link to access the page of the documentation that contains the math module: https://docs. python. org/3/library/math. html

For this lab, you will write a program that has this output if the user enters 100 and 72:

Here is some pseudocode to help you write your program:

Import the math module
Ask the user for the first number
Ask the user for the second number
Print the square root of the first number
Print the square root of the second number
To write this program, you will search the math module page to find the function that you need. For most browsers, if you press the CTRL + F, a box will pop up that will let you search on that page. This will allow you to find the function that you seek quickly.

When your program is working properly, take a screenshot of it to turn in. If you cannot get your code to work properly, turn in the screenshot along with a paragraph that explains what you did to try to fix it.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Felicia wants to become a head surgeon by december 2013. she designs the career milestones that she would need to complete her goal. by june 2013, she was not licensed. which best describes what she should do?
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
You know the right answer?
Have you ever used an owner’s manual to figure out how to operate something that you had just purcha...
Questions
question
Mathematics, 06.10.2021 18:50
question
Mathematics, 06.10.2021 18:50
Questions on the website: 13722359