Question: Knightro wants to implement a combination lock. However, he is having trouble figuring out what numbers he will use. He wants to generate a random
Knightro wants to implement a combination lock. However, he is having trouble figuring out what numbers he will use. He wants to generate a random number between and inclusively.
import random
firstnumber random.randint
Flag question: Question
Question pts
Knightro is planning on reporting Petey for harassment. He has written the following code to give the average time in between the times Petey has bothered him.
import math
total minminmin
However, he wants to embellish how bad it is by rounding the total down to the next integer. Using the math library, how would he do this? He wants to save the value in the variable, total.
Flag question: Question
Question pts
Now, Knightro wanted to add two layers of complexity to discourage Petey. He wants to take a random number from and save it as a variable named number. He then wants to create another line of code that will take the square root of that number, and then rounds it up to the next integer, and saves it as the variable ans.
import math
import random
You must use randint in line and the math library in line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
