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 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
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
Business, 16.02.2021 03:50
question
Mathematics, 16.02.2021 03:50
question
Mathematics, 16.02.2021 03:50