MarkusXL
lvl.4
United States
Offline
|
Just little Python exercise:
Print a graph of the sine function on the S1 Console:
from time import sleep
from math import sin, radians
graph_line = ''
# S1 Console Demo - prints a sine curve with *
for n in range(28, 90):
circle_1 = 50 * (1 + sin(radians(n * 10)))
for i in range(int(circle_1)):
graph_line = graph_line + '*'
print(graph_line)
graph_line = ''
sleep(0.25)
|
|