#!/usr/bin/env python3

import math

#width = int(input('Terminal width: '))
#scale = float(input('scale factor? '))
import shutil
winsize = shutil.get_terminal_size((100,100))
print(winsize)
width = winsize.columns - 5
scale = 0.3

x = 0
step = 0.3
while x < 30:

    y = math.sin(x) * math.cos(scale*x)

    #c = 1
    #while c <= width*y:
    for c in range( int((y+1.0) * width / 2)):
        print('-', end='')

    print('%.2f'%y)

    x += step