Skip to content

Commit addcae8

Browse files
committed
moved functions to session 9
1 parent 662300e commit addcae8

File tree

5 files changed

+506
-98
lines changed

5 files changed

+506
-98
lines changed

slides_sources/source/exercises/index.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Session 6:
5050
.. toctree::
5151
:maxdepth: 1
5252

53-
lambda_magic
54-
trapezoid
53+
args_kwargs_lab
54+
5555

5656
Session 7:
5757
----------
@@ -66,5 +66,12 @@ Session 8:
6666
:maxdepth: 1
6767

6868
circle_class
69-
7069
sparse_array
70+
71+
Session 9:
72+
----------
73+
.. toctree::
74+
:maxdepth: 1
75+
76+
lambda_magic
77+
trapezoid

slides_sources/source/session06.rst

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -605,21 +605,13 @@ Becomes:
605605
LAB
606606
----
607607

608-
.. rst-class:: medium
609-
610-
keyword arguments:
611-
612-
* Write a function that has four optional parameters (with defaults):
608+
Time to play with all this to get a feel for it.
613609

614-
- fore_color
615-
- back_color
616-
- link_color
617-
- visited_color
610+
:ref:`exercise_args_kwargs_lab`
618611

619-
* Have it print the colors (use strings for the colors)
620-
* Call it with a couple different parameters set
621-
* Have it pull the parameters out with ``*args, **kwargs``
622-
- and print those
612+
This is not all that clearly specified -- the goal is for you to
613+
experiment with various ways to define and call functions, so you
614+
can understand what's possible, and what happens with each call.
623615

624616

625617
=====================================

slides_sources/source/session07.rst

Lines changed: 21 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
.. include:: include.rst
22

3-
***************************************************
4-
Anonymous functions and Object Oriented programming
5-
***************************************************
3+
***************************
4+
Object Oriented programming
5+
***************************
6+
7+
================
8+
Review/Questions
9+
================
10+
11+
Review of Previous Class
12+
------------------------
13+
14+
.. rst-class:: medium
15+
16+
Advanced Argument passing
17+
18+
Testing
19+
620

721
===================
822
Anonymous functions
@@ -168,6 +182,7 @@ Yes:
168182

169183
But Guido thinks almost all uses of reduce are really ``sum()``
170184

185+
171186
Functional Programming
172187
----------------------
173188

@@ -218,6 +233,9 @@ lambda in keyword arguments
218233
219234
Note when the keyword argument is evaluated: this turns out to be very handy!
220235

236+
lambda in defaultdict
237+
---------------------
238+
221239
===
222240
LAB
223241
===
@@ -443,73 +461,6 @@ Object Oriented Programming
443461
Overriding methods
444462

445463

446-
================
447-
Review/Questions
448-
================
449-
450-
Review of Previous Class
451-
------------------------
452-
453-
.. rst-class:: medium
454-
Advanced Argument passing
455-
456-
Lambda
457-
458-
Functions as Objects
459-
460-
Homework review
461-
---------------
462-
463-
Homework Questions?
464-
465-
Did you all get a trapedzoidal rule function working?
466-
467-
Anyone get the "passing through of arguments"?
468-
469-
How about the adaptive solutions?
470-
471-
472-
Notes on Floating point
473-
-----------------------
474-
475-
Did anyone look at the isclose() function?
476-
477-
How to make a range of numbers in floating point?
478-
479-
Anyone do something like this?:
480-
481-
.. code-block:: python
482-
483-
s = []
484-
x = a
485-
while x <= b:
486-
s.append(x)
487-
x += delta_x
488-
489-
-- see my solution.
490-
491-
Some notes about FP issues:
492-
493-
https://docs.python.org/3.5/tutorial/floatingpoint.html
494-
495-
Code Review
496-
-----------
497-
498-
Anyone unsatisfied with their solution -- or stuck?
499-
500-
Let's do a code review!
501-
502-
503-
Lightning Talks Today:
504-
-----------------------
505-
506-
.. rst-class:: medium
507-
508-
Charles E Robison
509-
510-
Paul S Briant
511-
512-
Paul Vosper
513464

514465

515466
===========================

0 commit comments

Comments
 (0)