Help w/ easy python problem

Tomasz Lisowski list at
Thu Sep 22 08:55:45 CEST 2005

r2_r2 at napisał(a):
> Actually, it is not a sin curve i need to plot, it is dots running down
> the page in the shape of a sin curve like this
> .
>   .
>    .
> etc...

Seems, like a homework to me :-)

Anyway, use the following hints:

math.sin() is your sine function, ranging, from -1.0 to 1.0 inclusively
set up a for loop printing the strings containing spaces, and one dot at 
the appropriate location with:
- the appropriate argument increase step between the lines (print 
- the appropriate scaling of the <-1.0, 1.0> range into e.g. <0, 71>, 
representing the 72 characters wide lines being printed.

Tomasz Lisowski

More information about the Python-list mailing list