#!/usr/bin/env python3

import os                       # operating system
import math                     # nomen est omen
import random                   # idem
import statistics
from datetime import date

print(os.getcwd())              # current working directory
os.system('ls')                 # execute 'ls' command
if  1==2 :
  os.system('mkdir myDir')      # execute 'mkdir'
  os.chdir('myDir')             # change working directory
  os.system('cp ../test.py .')  # copy
  os.system('./test.py')        # run script (yourself again)

print()
print("math   cos      : ", math.cos(math.pi/4)*math.sqrt(2.0))
print("math   log      : ", math.log(1024, 2))
print()
print("random choice   : ", random.choice(['apple', 'pear', 'banana']))
print("random sample   : ", random.sample(range(100), 4))
print("random random   : ", random.random())
print()
data = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5]
print("stat   mean     : ", statistics.mean(data))
print("stat   variance : ", statistics.variance(data))
