Import math import random
print(math.ceil(random.random()))
Answers
Answered by
0
Answer:
could you please be more specific
Answered by
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
Hindi,
4 months ago
Environmental Sciences,
4 months ago
Math,
4 months ago
Physics,
1 year ago
Business Studies,
1 year ago