Andrew K.

asked • 02/05/21

Conditionals_Functions

Write python statements using the appropriate function for each below.

Please be sure to have blank lines between the statements.

 

- Input a number and print the square root of that number, rounding to two decimal places.

- Randomly generate two numbers between 1 and 20 and add them together to print out a result.

- Randomly generate a number between 1-100 that is a multiple of 5. Print out the number.

- From the following set of numbers use the max() and min() functions to print out their respective value.

               5,7,8,10,-1,-2,20,45,55,99,0,23

- Determine the distance between two points (p1,p2, and q1,q2), input p1 and p2 is 2 less, input q1 and q2 is 5 more). Print out the distance.


1 Expert Answer

By:

Patrick B. answered • 02/06/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.