fl <rxjw...@gmail.com>:

> I have read a lot about Python, but it still has a problem now on a
> simple exercise. For example, I want to generate a sine curve.

Here you go:

========================================================================
#!/usr/bin/env python3

import math

for x in range(0, 361, 15):
    print(int((math.sin(x / 180 * math.pi) + 1) * 30 + 0.5) * " " + "*")
========================================================================


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to