-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Computer Science for Beginners | ||
|
||
## Lesson 2: Functions | ||
|
||
Lesson Date: 2024-06-30 | ||
|
||
### Topics | ||
|
||
- Domain and Range | ||
- Domain: The set of all possible inputs | ||
- Range: The set of all possible outputs | ||
- Function **Signature** | ||
- Name | ||
- Parameter list | ||
- Parameters vs Arguments | ||
- Technically, they refer to the same thing, but have slight nuanced differences | ||
- Similar to: **Emigrate (from)** vs **Immigrate (to)** | ||
- Functions **receive** parameters | ||
- Functions are **called (or invoked)** with arguments | ||
- [Arity of Functions](https://en.wikipedia.org/wiki/Arity) | ||
- Nullary / Niladic (receives 0 arguments) | ||
- Unary / Monadic (receives 1 argument) | ||
- Binary / Dyadic (receives 2 arguments) | ||
- Ternary / Triadic (receives 3 arguments) | ||
- Quaternary / Tetradic (4) | ||
- Quinary / Pentadic (5) | ||
- Senary / Hexadic (6) | ||
- Septenary / Hebdomadic (7) | ||
- Octonary / Ogdoadic (8) | ||
- Nonary / Enneadic (9) | ||
- Denary / Decenary | ||
- n-ary | ||
- Variadic (varying arguments) | ||
- [Composition of functions](https://en.wikipedia.org/wiki/Function_composition) | ||
- Functions that call other functions | ||
- [Single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) | ||
- One function should do one thing | ||
- Abstraction & Encapsulation | ||
- Things we use in our daily lives without understanding how they work "under the hood" | ||
- Cars | ||
- Airplanes | ||
- Helper Functions | ||
- Break down more complex steps into logical sections | ||
- Think about making a PB&J sandwich... now, making a pizza. Making a pizza requires multiple phases. | ||
- Helpers vs Utilities | ||
- Not useful standalone (helper functions) vs useful standalone (utility functions) | ||
- Recursion | ||
- It is its own helper function | ||
- Base case(s) | ||
- Recursive case(s) | ||
- Subproblems | ||
- Recursion Examples | ||
- Video call infinite mirroring | ||
|
||
### Reading / Videos | ||
|
||
- Code Stars: https://www.youtube.com/watch?v=dU1xS07N-FA | ||
- Automated Foosball Table: https://www.youtube.com/watch?v=xrwXZXGiP1w | ||
|
||
### Homework | ||
|
||
Please sign up for the Python + Javascript track on Exercism: | ||
- Python: https://exercism.org/tracks/python | ||
- JavaScript: https://exercism.org/tracks/javascript | ||
|
||
**Notes** | ||
|
||
- Since students should already have GitHub accounts, please sign up for Exercism using GitHub. | ||
- Exercism is nice, used by A LOT of people, and has both an online as well as an offline (requires installing software on local computer) option. | ||
- Get through as many exercises as you can (at the minimum, try to do 1) | ||
- FWIW (for what it's worth), it took me 5 minutes to sign up and complete the first exercise in Python -- most of the time was spent reading the website instructions and understanding its layout -- and 20 seconds to complete the first exercise in JavaScript | ||
- Just a friendly reminder that it's not a race or a competition. | ||
|
||
**General reminders** | ||
|
||
- If you are stuck on anything for 15-30 minutes without a way forward, please post any question(s) in the Slack channel to ask for help! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Computer Science for Beginners | ||
|
||
## Lesson 3: Lab | ||
|
||
Lesson Date: 2024-07-14 | ||
|
||
### Topics | ||
|
||
- Lab-only, no lecture. | ||
- Students should bring their laptops and expect to write code (or if they haven't yet, get help with setting up their IDEs to write some code), or pair up with other students and write code together. | ||
- Work through [Exercism Python](https://exercism.org/tracks/python) exercises together as a class. | ||
- [Hello World](https://exercism.org/tracks/python/exercises/hello-world) | ||
- [Guido's Gorgeous Lasgana](https://exercism.org/tracks/python/exercises/guidos-gorgeous-lasagna) | ||
- [Ghost Gobble Arcade Game](https://exercism.org/tracks/python/exercises/ghost-gobble-arcade-game) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Computer Science for Beginners | ||
|
||
## Lesson 4: Lab | ||
|
||
Lesson Date: 2024-07-21 | ||
|
||
### Topics | ||
|
||
- Lab-only, no lecture. | ||
- Students should bring their laptops and expect to write code (or if they haven't yet, get help with setting up their IDEs to write some code), or pair up with other students and write code together. | ||
- Work through Exercism exercises together as a class. |