Boyah Forums

General => Internet, Science, & Technology => Topic started by: guff on February 08, 2009, 01:04:23 AM

Title: python class
Post by: guff on February 08, 2009, 01:04:23 AM
lesson one: generators

jmv and lawlz do either of you understand them in the slightest  akudood;

for your homework assignment you must write a generator that take an arbitrary number of integers as input, and then iterates over the pattern formed between the successive differences between elements of the input i.e. foo(1,2) => 1, 2, 3, 4, 5..., foo(1,3) => 1, 3, 5, 7, foo(1,3,7) => 1, 3, 7, 9, 13, 15, 19...

akudood;
Title: Re: python class
Post by: ncba93ivyase on February 08, 2009, 07:21:43 AM
how can you assign homework without the actual lesson
Title: Re: python class
Post by: guff on February 08, 2009, 10:02:36 AM
Quote from: Pancake Persona on February 08, 2009, 07:21:43 AM
how can you assign homework without the actual lesson
you're supposed to read the textbook welcome to college akudood;