Computer Science, asked by ssaiarpan59331, 9 months ago

What would be the output produced by the following code:
import math
import random
print math=ceil (random.random)))

Answers

Answered by mariospartan
1

Explanation:

Since the name of the programming language is not defined, I am providing my view on various programming language

C & C++:

This will give errors because header file should include "#" symbol.

Also, print method does not allow assignment operator so it will give error

Java:

It is the same as the case for java similar to c and c++. Here for printing we use System.out.println();

Python:

This would also provide error since "ceil" method is not available.

In other programming language, if it is working fine, ceil will round off to higher numbers. Eg. 6.5 will be 7. Also random will generate random number. So the random number will be rounded off.

To Know more:

https://brainly.in/question/11645229

Write a random number generator that generates random numbers between 1 and 6 (simulates a dice).

https://brainly.in/question/11672376

Write a program in Java to generate random numbers between the 10 to 40 numbers and print second largest number​

Similar questions