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, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
5.a fishing rod is formed from a composite material of 0.5 kg of glass fibers embedded in a matrix of 0.5 kg of epoxy resin. the glass fibers are assumed to be long, continuous and unidirectional. to achieve a greater stiffness it is proposed to use a different composite that is comprised of long continuous carbon fibers that will be embedded in a matrix of 0.5 kg of epoxy resin. if the modulus of elasticity of the carbon fiber composite is 10% greater than the elastic modulus of the glass fiber composite, estimate the mass of carbon fibers that will be used to make the carbon fiber composite. assume the applied tensile stress is parallel to the direction of the long axis of the fibers. the epoxy resin, glass fiber, and carbon fiber have an elastic modulus of 5, 86, and 350 gpa respectively and a density of 1100, 2500, and 1800 respectively.
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
Social Studies, 08.04.2020 20:55
question
History, 08.04.2020 20:56
Questions on the website: 13722360