subject
Engineering, 29.03.2021 06:00 FavvBella84

You do not need to use or create any user-defined functions in this program You need to import random, time, math libraries
You need to use time, sleep 0, candom. randrange (), math. sgrt () and
rath. pou () functions (see examples from handout from week 4 and 5)
Prompt the user for a number (float)
Use that number to output for things using built-in Python functions:
Sleep (pause) for that many seconds
Output a random number between 1 and the number entered by the user
o Output the square root of the number entered by the user
o Output the result of the number entered by the user to the power of 2
Your output should look like the same run below (but should allow for user input of the number)
Sample Run (based on user input of 4)
Please enter a number: 4
Sleeping for 4.0 seconds
Random number is: 2
The square root of 4,0 =2.0
4.0 to the power of 2 = 16.0

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Heat is added to a piston-cylinder device filled with 2 kg of air to raise its temperature 400 c from an initial temperature of t1 27 cand pressure of pi 1 mpa. the process is isobaric process. find a)-the final pressure p2 b)-the heat transfer to the air.
Answers: 1
question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Slip occurs via two partial dislocations because of (a) the shorter path of the partial dislocation lines; (b) the lower energy state through partial dislocations; (c) the charge balance.
Answers: 1
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
You know the right answer?
You do not need to use or create any user-defined functions in this program You need to import rand...
Questions
question
History, 28.07.2019 17:30
question
History, 28.07.2019 17:30
question
English, 28.07.2019 17:30
question
Health, 28.07.2019 17:30
Questions on the website: 13722363