Oke,
That's also the point Alan is making. I try now to make the function and puttting it on this maillist if it's ready. Maybe I can learn more about efficient progamming or better way to do this. Roelof > From: st...@pearwood.info > To: tutor@python.org > Date: Sat, 28 Aug 2010 00:15:15 +1000 > Subject: Re: [Tutor] exercise problem > > On Fri, 27 Aug 2010 08:23:06 pm Roelof Wobben wrote: > > > > Write a function add_vectors(u, v) that takes two lists of > > > > numbers > [...] > > My new idea is that u is the number which must be calculated and v is > > the vector which containts the outcome or u is the outcome of the > > first numbers and v the outcome of the second numbers. > > If you had a function called "add_numbers(x, y)", you would say that x > and y are the numbers which are to be added. If you have a function > called "add_vectors(u, v)", then u and v are the vectors to be added. > Perhaps this example will help: > > > u = [1, 10, 100] > v = [2, 11, 111] > add_vectors(u, v) > => [3, 21, 211] > > > > > -- > Steven D'Aprano > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor