Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Now, Knightro wanted to add two layers of complexity to discourage Petey. He wants to take a random number from 5 0 - 5 0

Now, Knightro wanted to add two layers of complexity to discourage Petey. He wants to take a random number from 50-500 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
ans =1+ math.isqrt(n
You must use randint in line1, and the math library in line 2.
Answer 1:
(You left this blank)
Answer 2:
ans =1+ math.isqrt(number-1)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. Is IBMs program really a mentoring program? Why or why not?

Answered: 1 week ago