Re: [Tutor] doing maths on lists

2010-12-20 Thread Chris Begert
Dave and Christian Thanks a lot for the help, it looks like it works! Chris Original-Nachricht > Datum: Mon, 20 Dec 2010 07:32:45 -0500 > Von: Dave Angel > An: Chris Begert > CC: tutor@python.org > Betreff: Re: [Tutor] doing maths on lists > On 01/-

Re: [Tutor] doing maths on lists

2010-12-20 Thread Chris Begert
Thanks I tried to put a float around my lists as well as around the sum but it didn't work. Do I have to do some type casting around all items of the list? Cheers Original-Nachricht > Datum: Mon, 20 Dec 2010 16:33:39 +0530 > Von: Nitin Pawar > An: Chris Beger

[Tutor] doing maths on lists

2010-12-20 Thread Chris Begert
Bonjour I have three lists with 65 float items and would like to do the following sum: L0 = ([sum(L0A[i]*cos(L0B[i]+L0C[i]*JME) for i in range(0,64,1))]) So it just should do a sum across all the items in the list: L0A[0]*cos(L0B[0]+L0C[0]*JME)+ L0A[1]*cos(L0B[1]+L0C[1]*JME)+... + L0A[64]*cos(L

[Tutor] lists, arrays and saving data

2010-11-21 Thread Chris Begert
Hi Gurus I just wrote my first little python program; so yes I'm very new to all this. The goal in the end is to have a program that shows how the sun moves from the point of view of a given location (i.e. solar paths added to some sort of stereographic diagram). My very first program calcula