[Tutor] got it
Kent Johnson
kent37 at tds.net
Thu Feb 3 19:24:53 CET 2005
alieks laouhe wrote:
> i came up with
>
> z=0
> while z<= 2*pi:
> z=z+pi/6
> print z
> z=z+pi/6
I don't think you're quite there. You are incrementing by pi/6 twice in the loop, so the printed
values will differ by pi/3. And the first value printed will be pi/6, not 0.
Where are you getting the value of pi? You can import it from the math module with
from math import pi
Kent
>
> "while" makes alot more sense than using range
> i still don't know if its the most efficient way
> to do it this is day two with python, im pushing 30hrs
> straight lots of coffee and ciggarettes!
> So far I really like python...alot. it's so intuitive
> I started trying to learn c but it's lack of intuitive
> string handling made me shudder... so, i tried perl
> and it was a breath of fresh air after c.
> then i stumbled upon python. it's the most intuitive
> yet.
> anybody here have any experiance writing scripts for
> processing audio data?
> so, im glad python has alot of learning resources.
> thanks for your help
> alex
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list