Practical Coding in Python

Learn to write and validate your own code

Darren Kessner, PhD

(revised September 1, 2025)

Previous: hello_math

hello_random

Output:

Random values in [0,1)
0.8871064783063093
0.6520635129679427
0.40133146856792457
0.8402098710956626
0.9254719301853334

Random values in [0,100)
7.640894345786132
77.22174647349519
23.45920849132487
61.74202735247768
73.27445178291467

Random integers in [1,10]
5
10
6
5
7

Next: