Skip to content

Commit ea3d39c

Browse files
updating rendered materials
1 parent a122425 commit ea3d39c

14 files changed

Lines changed: 274 additions & 217 deletions

‎_sources/exercises/index.rst.txt‎

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#####################
2-
Python 210: Exercises
3-
#####################
1+
#############
2+
All Exercises
3+
#############
44

55
These are the exercises associated with each Lesson:
66

@@ -138,19 +138,10 @@ The following are not required, but can be useful learning tools. Feel free to t
138138

139139
mailroom-meta.rst
140140

141-
142141
mailroom-mock.rst
143142

144143
threaded_downloader.rst
145144

146-
Assorted Additional Exercises
147-
=============================
148-
149-
These aren't required for any particular lesson -- but could be a good learning experience!
150-
151-
.. toctree::
152-
:maxdepth: 1
153-
154145

155146

156147

‎_sources/index.rst.txt‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,29 @@ This site holds many of the materials for the
1313

1414
This site can be thought of as the textbook for Programming in Python: the first course in the program. It contains notes about the topics covered in the classes, programming exercises, supplemental materials about setting up a development environment, and assorted references about Python-related topics.
1515

16-
Course Program
17-
==============
16+
17+
18+
Course Materials
19+
================
20+
1821
.. toctree::
1922
:maxdepth: 2
2023

21-
./class_schedule/index
24+
modules/dev_environment/index
2225

26+
modules/index
2327

28+
exercises/index
2429

25-
Individual Modules and Exercises
26-
================================
30+
31+
10 Lesson Course Program
32+
========================
2733

2834
.. toctree::
2935
:maxdepth: 2
3036

31-
modules/dev_environment/index
32-
modules/index
33-
exercises/index
37+
./class_schedule/index
38+
3439

3540

3641
.. :caption: Contents:

‎_sources/modules/Coroutines.rst.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ So calling ``send`` ran the print statement, and then raise a ``StopIteration``
9191
9292
StopIteration:
9393
94-
And indeed, they have a lot on common -- in fact, before Python3.5, when the ``async`` keyword was added, you used generators to make coroutines.
94+
And indeed, they have a lot on common -- in fact, before Python3.5, when the ``async`` keyword was added, you used generator functions to make coroutines.
9595

9696
But if a coroutine raises ``StopIteration`` right away, what's the point? Well, recall that the point of a coroutine (and asnyc in general), is to be able to return control to the system, while you wait for something else to happen. And thus the "await" keyword. So a coroutine isn't useful unless it uses ``await``
9797

‎_sources/modules/IteratorsAndGenerators.rst.txt‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Iterators and Generators
1111
A note about Python History
1212
---------------------------
1313

14+
Python 2
15+
.........
16+
1417
Python used to be all about sequences -- a good chunk of anything you did
1518
was stored in a sequence, or involved manipulating a sequence.
1619

@@ -24,7 +27,7 @@ was stored in a sequence, or involved manipulating a sequence.
2427
- ``zip()``
2528
- ...
2629

27-
In python2 -- those are all sequences.
30+
In python2 -- those are all sequences. (in the case of zip and dict methods, they return actual lists)
2831

2932
But it turns out that the most common operation for sequences is to iterate through them:
3033

@@ -50,10 +53,10 @@ But why make a full copy of all the keys, when all you want to do is:
5053
for k in dict.keys():
5154
do_something_with(k)
5255
53-
Even worse: ``dict.items()`` created a full list of ``(key,value)`` tuples.
56+
Even worse: ``dict.items()`` created a full list of ``(key, value)`` tuples.
5457
-- a complete copy of all the data in the dict.
5558

56-
Even worse: ``enumerate(dict.items())`` created a whole list of
59+
Even worse still: ``enumerate(dict.items())`` created a whole list of
5760
``(index, (key, value))`` tuples -- lots of copies of everything.
5861

5962
Enter ``iter*``
@@ -65,27 +68,25 @@ Python2 then introduced "iterable" versions of a number of functions and methods
6568
``dict.iterkeys()``
6669
``dict.itervalues()``
6770

68-
So you could now iterate through that stuff without copying anything.
69-
70-
**Python3**
71+
So you could now iterate through that stuff without copying anything. Nice performance benefits, but a somewhat ugly interface.
7172

72-
Python3 embraces iterables -- now everything that could be an iterator
73-
is already an iterator -- no unnecessary copies.
73+
Python3
74+
.......
7475

75-
An iterator is an iterable that has been made more efficient by
76-
removing as much from memory as possible.
76+
Python3 embraces iterables -- now everything that could be an iterable without making a copy is done that way -- no unnecessary copies.
7777

78-
You have to make a list out of them explicitly if you really want it:
78+
If you DO need an actual sequence (becasue you want to do something with it other than iterate over it), you have to make a list out of them explicitly:
7979

8080
``list(dict.keys())``
8181

8282
Then there is an entire module: ``itertools`` that provides nifty ways
8383
to iterate through stuff.
8484

85-
We will visit this again soon.
85+
That will be covered elsewhere.
86+
87+
So while I used to say that python was "all about sequences", I know say:
8688

87-
So while I used to say that python was all about sequences
88-
-- it is now all about iterables.
89+
"Python is all about iterables
8990

9091

9192
Iterators and Iterables

‎_sources/modules/index.rst.txt‎

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11

2-
##########################################
3-
Py210: Introduction to Python: Topic Notes
4-
##########################################
2+
######################
3+
Introduction to Python
4+
######################
55

66
These are assorted notes about particular python topics used in the Python certificate program.
77

8-
Arranged in order of the lessons:
9-
10-
See the Canvas or EdX instance for your class for the full lesson descriptions.
11-
128

139
Setting up your Environment
1410
---------------------------
@@ -27,6 +23,15 @@ Setting up your Environment
2723
HowToRunAPythonFile
2824
Learning
2925

26+
Exercise:
27+
..........
28+
29+
.. toctree::
30+
:maxdepth: 1
31+
32+
../exercises/python_pushups.rst
33+
34+
3035
Basic Python
3136
------------
3237

@@ -35,17 +40,26 @@ Basic Python
3540

3641
BasicPython
3742
Functions
38-
Recursion
3943

40-
Functions
44+
.. toctree::
45+
:maxdepth: 1
46+
47+
../exercises/grid_printer.rst
48+
../exercises/fizz_buzz.rst
49+
50+
Recursion
4151
---------
4252

4353
.. toctree::
4454
:maxdepth: 1
4555

46-
Functions
4756
Recursion
4857

58+
.. toctree::
59+
:maxdepth: 1
60+
61+
../exercises/fib_and_lucas.rst
62+
4963

5064
Booleans
5165
--------
@@ -200,7 +214,7 @@ Advanced Testing
200214
Extras
201215
------
202216

203-
The following are some extra advanced topics that might be of interest
217+
The following are some extra topics that might be of interest
204218

205219
.. toctree::
206220
:maxdepth: 1

‎exercises/index.html‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1010

11-
<title>Python 210: Exercises &mdash; Python 210 6.0 documentation</title>
11+
<title>All Exercises &mdash; Python 210 6.0 documentation</title>
1212

1313

1414

@@ -36,7 +36,7 @@
3636
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
3737
<link rel="index" title="Index" href="../genindex.html" />
3838
<link rel="search" title="Search" href="../search.html" />
39-
<link rel="next" title="Dictionary and Set Lab" href="dict_lab.html" />
39+
<link rel="next" title="Grid Printer Exercise" href="grid_printer.html" />
4040
<link rel="prev" title="Performance and Profiling" href="../modules/Profiling.html" />
4141
</head>
4242

@@ -81,13 +81,10 @@
8181

8282

8383

84-
<ul>
85-
<li class="toctree-l1"><a class="reference internal" href="../class_schedule/index.html">Python 210 Class Schedule</a></li>
86-
</ul>
87-
<ul class="current">
84+
<ul class="current">
8885
<li class="toctree-l1"><a class="reference internal" href="../modules/dev_environment/index.html">Installing Python and core tools</a></li>
89-
<li class="toctree-l1"><a class="reference internal" href="../modules/index.html">Py210: Introduction to Python: Topic Notes</a></li>
90-
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python 210: Exercises</a><ul>
86+
<li class="toctree-l1"><a class="reference internal" href="../modules/index.html">Introduction to Python</a></li>
87+
<li class="toctree-l1 current"><a class="current reference internal" href="#">All Exercises</a><ul>
9188
<li class="toctree-l2"><a class="reference internal" href="#lesson-1-introductions-and-setting-up-your-environment">Lesson 1: Introductions and Setting up your Environment</a><ul>
9289
<li class="toctree-l3"><a class="reference internal" href="python_pushups.html">Python Pushups</a></li>
9390
</ul>
@@ -154,13 +151,13 @@
154151
<li class="toctree-l3"><a class="reference internal" href="mailroom-meta.html">Mailroom – metaprogramming it!</a></li>
155152
<li class="toctree-l3"><a class="reference internal" href="mailroom-mock.html">Mocking Mailroom</a></li>
156153
<li class="toctree-l3"><a class="reference internal" href="threaded_downloader.html">Threaded Web Scraper</a></li>
157-
<li class="toctree-l3"><a class="reference internal" href="#assorted-additional-exercises">Assorted Additional Exercises</a><ul class="simple">
158154
</ul>
159155
</li>
160156
</ul>
161157
</li>
162158
</ul>
163-
</li>
159+
<ul>
160+
<li class="toctree-l1"><a class="reference internal" href="../class_schedule/index.html">Python 210 Class Schedule</a></li>
164161
</ul>
165162

166163

@@ -206,7 +203,7 @@
206203

207204
<li><a href="../index.html">Docs</a> &raquo;</li>
208205

209-
<li>Python 210: Exercises</li>
206+
<li>All Exercises</li>
210207

211208

212209
<li class="wy-breadcrumbs-aside">
@@ -225,8 +222,8 @@
225222
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
226223
<div itemprop="articleBody">
227224

228-
<div class="section" id="python-210-exercises">
229-
<h1>Python 210: Exercises<a class="headerlink" href="#python-210-exercises" title="Permalink to this headline"></a></h1>
225+
<div class="section" id="all-exercises">
226+
<h1>All Exercises<a class="headerlink" href="#all-exercises" title="Permalink to this headline"></a></h1>
230227
<p>These are the exercises associated with each Lesson:</p>
231228
<p>See the Canvas or EdX instance for your class for the full lesson descriptions.</p>
232229
<div class="section" id="lesson-1-introductions-and-setting-up-your-environment">
@@ -341,12 +338,6 @@ <h2>Extra Exercises<a class="headerlink" href="#extra-exercises" title="Permalin
341338
<li class="toctree-l1"><a class="reference internal" href="threaded_downloader.html">Threaded Web Scraper</a></li>
342339
</ul>
343340
</div>
344-
<div class="section" id="assorted-additional-exercises">
345-
<h3>Assorted Additional Exercises<a class="headerlink" href="#assorted-additional-exercises" title="Permalink to this headline"></a></h3>
346-
<p>These aren’t required for any particular lesson – but could be a good learning experience!</p>
347-
<div class="toctree-wrapper compound">
348-
</div>
349-
</div>
350341
</div>
351342
</div>
352343

@@ -358,7 +349,7 @@ <h3>Assorted Additional Exercises<a class="headerlink" href="#assorted-additiona
358349

359350
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
360351

361-
<a href="dict_lab.html" class="btn btn-neutral float-right" title="Dictionary and Set Lab" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
352+
<a href="grid_printer.html" class="btn btn-neutral float-right" title="Grid Printer Exercise" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
362353

363354

364355
<a href="../modules/Profiling.html" class="btn btn-neutral float-left" title="Performance and Profiling" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

‎genindex.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181

8282

8383
<ul>
84-
<li class="toctree-l1"><a class="reference internal" href="class_schedule/index.html">Python 210 Class Schedule</a></li>
84+
<li class="toctree-l1"><a class="reference internal" href="modules/dev_environment/index.html">Installing Python and core tools</a></li>
85+
<li class="toctree-l1"><a class="reference internal" href="modules/index.html">Introduction to Python</a></li>
86+
<li class="toctree-l1"><a class="reference internal" href="exercises/index.html">All Exercises</a></li>
8587
</ul>
8688
<ul>
87-
<li class="toctree-l1"><a class="reference internal" href="modules/dev_environment/index.html">Installing Python and core tools</a></li>
88-
<li class="toctree-l1"><a class="reference internal" href="modules/index.html">Py210: Introduction to Python: Topic Notes</a></li>
89-
<li class="toctree-l1"><a class="reference internal" href="exercises/index.html">Python 210: Exercises</a></li>
89+
<li class="toctree-l1"><a class="reference internal" href="class_schedule/index.html">Python 210 Class Schedule</a></li>
9090
</ul>
9191

9292

0 commit comments

Comments
 (0)