Message210077
Section 4.6 of the tutorial introduces function definition:
http://docs.python.org/3/tutorial/controlflow.html#defining-functions
The first example defines a function that *prints* a Fibonacci series.
A basic mistake made by students new to programming is to use a function to print values rather than to return them. In this sense, the example encourages bad practice and misses an opportunity to instruct. Since they have already met lists in Section 3, I suggest that returning a list of the values and then printing the list would enhance the tutorial. |
|
Date |
User |
Action |
Args |
2014-02-03 05:09:47 | aisaac | set | recipients:
+ aisaac, docs@python |
2014-02-03 05:09:47 | aisaac | set | messageid: <1391404187.28.0.545168168954.issue20496@psf.upfronthosting.co.za> |
2014-02-03 05:09:47 | aisaac | link | issue20496 messages |
2014-02-03 05:09:46 | aisaac | create | |
|