Python Exercise Example 50
**Problem:** Output a random number.
**Program Analysis:** Use the random module.
Program source code:
Example
#!/usr/bin/python
-- coding: UTF-8 --
import
random
# Generate a random number between 10 and 20
(
random
.
uniform
(
10
,
20
)
)
The output of the above example is:
14.4012371357
Python 100 Examples