python3
>>> import math >>> math.pi >>> math.cos(math.pi) >>> math.floor(7.8) >>> math.ceil(7.1)
>>> import random >>> for i in range(10): ... print(random.randint(1,10)) ...
The value of pi is 3.141592653589793 The cosine of pi is -1.0 The floor of pi is 3 The ceiling of pi is 4 86 78 32 69 11 Dice game 4 4 4 2 2 4 6 2 1 6 You rolled a 7 after 5 tries
cd it116
cd ex
mkdir ex13
ls
cd it116/ex/ex13
python3 ex13.py
The value of pi is 3.141592653589793 The cosine of pi is -1.0 The floor of pi is 3 The ceiling of pi is 4 86 78 32 69 11 Dice game 4 4 4 2 2 4 6 2 1 6 You rolled a 7 after 5 tries
~ghoffman/it116_test/ex13.shThe script will prompt you for your Unix username.