Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dolsysmith committed Dec 13, 2023
1 parent 41c2249 commit 4bcb4b4
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion _sources/notebooks/homework/HW_Final_GR-md.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _sources/notebooks/homework/HW_Final_GR.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _sources/notebooks/lessons/2_1_describing_the_team.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions notebooks/homework/HW_Final_GR.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ <h1>Python Camp: Final Homework<a class="headerlink" href="#python-camp-final-ho
<h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to this heading">#</a></h2>
<p>Below you will find a series of exercises. For each exercise, do the following:</p>
<ol class="arabic simple">
<li><p>Run the first code cell under the exercise heading. This will execute some code needed to set up the problem.</p></li>
<li><p><strong>Run the first code cell under the exercise heading</strong>. This will execute some code needed to set up the problem.</p></li>
<li><p>Reading the instructions and write code in the empty code cell (labeled with the comment <code class="docutils literal notranslate"><span class="pre">Your</span> <span class="pre">code</span> <span class="pre">here</span></code>). Run this code.</p></li>
<li><p>Your code cell should include the comment line <code class="docutils literal notranslate"><span class="pre">#Your</span> <span class="pre">code</span> <span class="pre">below</span></code>. <strong>Please do not delete this comment</strong>, and if you accidentally delete the cell and have to recreate it, please insert that comment line at the top of the cell before entering your code.</p></li>
<li><p>Assuming your code does not produce any errors, run the code in the cell below the <code class="docutils literal notranslate"><span class="pre">Tests</span></code> heading. Each line of this code consists of a Python <a class="reference internal" href="../../glossary.html#term-assert-statement"><span class="xref std std-term">assert statement</span></a>.</p>
Expand All @@ -491,7 +491,7 @@ <h2>Instructions<a class="headerlink" href="#instructions" title="Permalink to t
<section id="exercise-1">
<h2>Exercise 1<a class="headerlink" href="#exercise-1" title="Permalink to this heading">#</a></h2>
<p>The following code creates a variable, <code class="docutils literal notranslate"><span class="pre">my_course</span></code>, from a string describing a GW course, with a course code, number, and section.</p>
<div class="cell docutils container">
<div class="cell tag_setup:1 docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">my_course</span> <span class="o">=</span> <span class="s1">&#39;WSTU 6566 10&#39;</span>
</pre></div>
Expand Down Expand Up @@ -642,7 +642,7 @@ <h2>Exercise 4<a class="headerlink" href="#exercise-4" title="Permalink to this
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1">#Your code below</span>
<span class="c1"># ---- Do not delete this cell! -----</span>
<span class="k">def</span> <span class="nf">count_courses</span><span class="p">(</span><span class="n">instructor_name</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">count_courses</span><span class="p">(</span><span class="n">instructor_name</span><span class="p">,</span> <span class="n">courses_db</span><span class="p">):</span>

<span class="k">return</span> <span class="n">course_count</span>
</pre></div>
Expand All @@ -653,9 +653,9 @@ <h2>Exercise 4<a class="headerlink" href="#exercise-4" title="Permalink to this
<h3>Tests for Exercise 4<a class="headerlink" href="#tests-for-exercise-4" title="Permalink to this heading">#</a></h3>
<div class="cell tag_test-case:4 docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Rath&#39;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Rath is teaching one course, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Rath&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
<span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Mack&#39;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Mack is teaching two courses, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Mack&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
<span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Smith&#39;</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Smith is not teaching any courses, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Smith&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Rath&#39;</span><span class="p">,</span> <span class="n">courses_db</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Rath is teaching one course, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Rath&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
<span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Mack&#39;</span><span class="p">,</span> <span class="n">courses_db</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Mack is teaching two courses, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Mack&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
<span class="k">assert</span> <span class="n">count_courses</span><span class="p">(</span><span class="s1">&#39;Smith&#39;</span><span class="p">,</span> <span class="n">courses_db</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="sa">f</span><span class="s1">&#39;Smith is not teaching any courses, but count_courses returns </span><span class="si">{</span><span class="n">count_courses</span><span class="p">(</span><span class="s2">&quot;Smith&quot;</span><span class="p">)</span><span class="si">}</span><span class="s1">.&#39;</span>
</pre></div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion notebooks/lessons/2_1_describing_the_team.html
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ <h3>II.2 Working with nested data<a class="headerlink" href="#ii-2-working-with-
<p class="admonition-title">Try it out!</p>
<p>Try updating a few of the keys in a few of the dictionaries in your team list. The diagram below might help you conceptualize the syntax you need.</p>
</div>
<a class="reference internal image-reference" href="https://gwu-libraries.github.io/python-camp/img/nested-data.png"><img alt="Image showing a box labeled my_team containing three smaller boxes, each containing key-value pairs and numbered sequentially from 0. Below that, a line of code, and boxes underneath pointing to each element -- a variable (a list), an index (2nd position in the list), a key (in the 2nd dictionary), and a new value (added to the 2nd dictionary)." class="align-center" src="https://gwu-libraries.github.io/python-camp/img/nested-data.png" style="width: 500px;" /></a>
</section>
<section id="ii-3-loops-lists-and-dictionaries">
<h3>II.3 Loops, lists, and dictionaries<a class="headerlink" href="#ii-3-loops-lists-and-dictionaries" title="Permalink to this heading">#</a></h3>
Expand Down
8 changes: 4 additions & 4 deletions parsons-problems/html/homework-1-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ <h2>Compose your code here</h2>

<div class="parsons-ps">
<div class="parsons-block" id="pb-1" draggable="true">
price_num = price[1:]
for price in book_prices:
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-2" draggable="true">
price_num = float(price_num) * 1.1
price_num = price[1:]
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-3" draggable="true">
print(price_num)
price_num = float(price_num) * 1.1
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-4" draggable="true">
for price in book_prices:
print(price_num)
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions parsons-problems/html/homework-1-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2>Compose your code here</h2>

<div class="parsons-ps">
<div class="parsons-block" id="pb-1" draggable="true">
for course in courses:
depts = []
</div>
</div>

Expand All @@ -61,13 +61,13 @@ <h2>Compose your code here</h2>

<div class="parsons-ps">
<div class="parsons-block" id="pb-4" draggable="true">
course_info = course.split()
for course in courses:
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-5" draggable="true">
depts = []
course_info = course.split()
</div>
</div>

Expand Down
18 changes: 9 additions & 9 deletions parsons-problems/html/homework-2-GR.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,55 +41,55 @@ <h2>Compose your code here</h2>

<div class="parsons-ps">
<div class="parsons-block" id="pb-1" draggable="true">
courses_db.append(course_dict)
course_dict['course_num'] = course_info[1]
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-2" draggable="true">
course_dict['dept_code'] = course_info[0]
course_dict['instructor'] = course_info[3]
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-3" draggable="true">
course_info = course.split()
print(courses_db)
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-4" draggable="true">
print(courses_db)
courses_db = []
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-5" draggable="true">
courses_db = []
course_dict = {}
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-6" draggable="true">
course_dict['course_num'] = course_info[1]
for course in courses:
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-7" draggable="true">
for course in courses:
courses_db.append(course_dict)
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-8" draggable="true">
course_dict['instructor'] = course_info[3]
course_info = course.split()
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-9" draggable="true">
course_dict = {}
course_dict['dept_code'] = course_info[0]
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions parsons-problems/html/lessons-2-1-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ <h2>Compose your code here</h2>

<div class="parsons-ps">
<div class="parsons-block" id="pb-2" draggable="true">
print(team)
for person in team:
</div>
</div>

<div class="parsons-ps">
<div class="parsons-block" id="pb-3" draggable="true">
for person in team:
print(team)
</div>
</div>

Expand Down

0 comments on commit 4bcb4b4

Please sign in to comment.