Computer Science, asked by yasjjoshi4609, 7 months ago

Import math import random
print(math.ceil(random.random()))

Answers

Answered by kowsik2000p2qzlh
0

Answer:

could you please be more specific

Answered by AddyBot
0

Answer:

1

Explanation:

we know that random.random() function will always give us output/number between 0 and 1 ,for example let us assume that in this case the output/number we get is 0.0123

i.e. random(random()) = 0.0123 (let)(which is between 0 and 1)

and then comes our ceil() function and we know that ceil() function rounds a number upward to its nearest integer. so in this case of 0.0123 the nearest upward integer is 1

i.e. ceil(0.0123) = 1

Hope you would understand.

Similar questions