Skip to content

Commit 77998c7

Browse files
committed
Merge branch 'main' of github.com:stanfordpython/stanfordpython.github.io
2 parents 8557a75 + 9eb074b commit 77998c7

File tree

5 files changed

+9
-17
lines changed

5 files changed

+9
-17
lines changed

public/lecture/4-condensed.pdf

-2.18 MB
Binary file not shown.

public/lecture/4-full.pdf

-2.18 MB
Binary file not shown.

public/lecture/Functions-4.pdf

672 KB
Binary file not shown.

public/page/lab/lesson-plan-4.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
[[TOC]]
44

55
## Pre-Section Preparation
6-
Visit the [Ed Workspace](https://edstem.org/us/courses/2850/workspaces/p6hfgD4nKeuxhtCcccSPSOCmXkhWA3d2) and fork it to make a copy that you own.
6+
Visit the [Ed Workspace](https://edstem.org/us/courses/20141/workspaces/pPk3915qSiZcUpWF1x6DyDSpMeRDQ70I) and fork it to make a copy that you own.
77

88
## Community Building \[5 mins\]
99
Here are some ideas for community building activities:
1010
* Ask everyone a Would You Rather question; there's a list in [this folder](https://drive.google.com/drive/folders/1SobifNwo_dPMA_dO78IUVUuyATwlqF9N?usp=sharing)
1111
* Have people sign up to lead a community building activity each week by adding their name to a Google Doc; then, each week, they'll be in charge of doing some sort of icebreaker during the first 5 minutes of section or so
1212
* Ask people to send you their favorite meme/video/song/picture/... and share during section
13-
* Ask people to DM you a fun fact about themselves and then share the fun fact and have them guess whose it was.
1413
* Ask people to share the last picture they took on their phone (that they're comfortable with) and share about it.
1514

1615

@@ -24,10 +23,10 @@ This (admittedly overwhelming) picture gives a full description of all of the pa
2423

2524
We also talked about scope and namespaces and ended by introducing the idea that functions are "first-class" (i.e., functions are objects). We didn't say much about what that means but there's an opportunity to explore that in this lab.
2625

27-
Students may have questions about their assignment, so it might be worth taking a moment to review [the spec](https://stanfordpython.com/#/page/assignment-1). If the students don't have a group, we're allowing them to complete this assignment individually with the requirement that they find a group by the end of the assignment.
26+
Students may have questions about their assignment, so it might be worth taking a moment to review [the spec](https://stanfordpython.com/#/page/assignment-1).
2827

2928

30-
## Problems \[55 mins\]
29+
## Problems \[45 mins\]
3130
<div class="alert alert-warning">
3231
<span>A lot of these problems can be a bit boring or really technical. I think it's important to note that students don't need to know the complicated parameter structure and namespaces/scope will be a lot more engaging if you have students make diagrams of it.</span>
3332
</div>
@@ -44,19 +43,12 @@ Students might be confused about `*args` and `**kwargs` because, for many of the
4443

4544
We've got some fun problems in this section, and I'd recommend spending time on one or two of them—emphasize *reading* these function signatures as much as *writing* them...
4645

47-
One way to do this is to ask students to create a function signature from a description like: "I'm thinking of a function with three positional arguments, one argument that must be positional, with a default value of 3, and a variadic number of keyword arguments. What's the signature of this function?" That activity is rough, but if your students can do that, they will *certainly* know the material. Up to you, but if done well, it could be a lot of fun. For your reference, [here's](https://docs.google.com/presentation/d/1vU5dAzYOHMBm5WGKdUWs-HYSmCWyV9YBXXlLMbjN2C8/edit?usp=sharing) a version of this activity that we did in this week's lecture.
46+
One way to do this is to ask students to create a function signature from a description like: "I'm thinking of a function with three positional arguments, one argument that must be positional, with a default value of 3, and a variadic number of keyword arguments. What's the signature of this function?" That activity is rough, but if your students can do that, they will *certainly* know the material. Up to you, but if done well, it could be a lot of fun. For your reference, [here's](https://docs.google.com/presentation/d/1PKOy7I7BOPw2yt71h90R9DNT_dzSow5l0QWQz1DLxPI/edit#slide=id.gd029f2dfc1_0_537) a version of this actvity to try out in groups! Make a copy of the presentatin before your groups work on it.
4847

4948
### First-Class Functions
5049
We've designed this part of the lab to be very open-ended. We revisit the idea of functions as objects in two weeks during the Functional Programming lecture, so the most ideal version of the world would be that students independently investigate some of those topics so that the FP lecture can be more effective. No pressure, though—this section is largely for future learning.
5150

52-
### Magic Methods
53-
I'm kinda nervous about this problem, but it sums up the entire last few weeks. Students build a class to "merge" together functions so you "overload" a function call. You investigate the `__call__` magic method while also designing a generic function signature `__call__(self, *args, **kwargs)`. The end product is really cool and really wacky.
51+
## Group Work \[20 min\]
5452

55-
## Group Work \[10 min\]
53+
We are leaving the last 20 minuties for groups to get started on the Scav Hunt!
5654

57-
At this point, students should start thinking about what they'd like to do for their final project. The way that we want to explain it is like this: we'll have three checkpoints for the project—a proposal (due at the end of week 5), a checkpoint (due sometime week 7-8), and the final project (due at the end of the quarter). They shouldn't be stressed by these deadlines because the purpose is really for us to support them: it's okay if they change their entire idea after they submit the proposal; the only thing they'll lose out on is our feedback. In other words, we'll give them feedback on **whatever they submit** and if they move in an entirely different direction, it's totally fine but our feedback won't be as useful.
58-
59-
I'd encourage you to allow your students to work in their groups for the last ten minutes if the entire group is in the same section. This way, they can check in on their progress for Assignment 1 and start brainstorming about the final project.
60-
61-
## [Fill Out the Weekly Reflection](https://forms.gle/ywkddywiVQxKXcgw6)
62-
These questions are a bit more high-level than usual. I'm actually not as concerned about student comprehension this week as I am about you folks and broader curriculum questions as we kinda descend into the second half of this course.

src/res/lectures.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
{
3939
"title": "Functions",
4040
"date": "2022-04-19",
41-
"condensed": "/lecture/4-condensed.pdf",
42-
"full": "/lecture/4-full.pdf",
43-
"visible": false,
41+
"condensed": "/lecture/Functions-4.pdf",
42+
"full": "/lecture/Functions-4.pdf",
43+
"visible": true,
4444
"code": "#"
4545
},
4646
{

0 commit comments

Comments
 (0)