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, 22.06.2019 06:30
What result from the passage of this amendment
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
Which of the following examples has four beats in each measure?
Answers: 2
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
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, 07.01.2021 21:10
question
Biology, 07.01.2021 21:10
question
Mathematics, 07.01.2021 21:10
question
Mathematics, 07.01.2021 21:10
question
Mathematics, 07.01.2021 21:10
Questions on the website: 13722363