from math import sin
from random import choices
# from base64 import b64decode
size = 50
response = "<pre>"

for num in range(1,size+1):
  if num < size*.9:
    num = round(sum(sin(n*num)/(5*n)*-num/2 for n in range(1,101))+num)
    response += " " * int(size-num)
    for x in range(1, num * 2):
        char = choices(['*','֍','⌠'],[.7,.2,.1])
        response += char[0]
    response += "\n"
  else:
    stumpthickness = size / 5
    response += " " * int(size - stumpthickness / 2) + "H" * round(stumpthickness)

# response += b64decode('TWVycnkgQ2hyaXN0bWFzIEJvYiENClRoYW5rIHlvdSBmb3IgZXZlcnl0aGluZyE=').decode('utf8'))
response += "</pre>"


# Line 8 contains the sawtooth function I came up with,
# which can be viewed graphed here:
# https://www.desmos.com/calculator/y2uonzc7x4
