Skip to content

Commit

Permalink
Merge pull request #7 from greenfox-academy/tomi-w3-2-functions
Browse files Browse the repository at this point in the history
Lesson plan - Python basics: functions and data structures
  • Loading branch information
EggDice committed Nov 18, 2015
2 parents 930f0a9 + 8fd1821 commit 3edcf11
Show file tree
Hide file tree
Showing 4 changed files with 3,243 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
alma
.DS_Store
*.pyc
55 changes: 55 additions & 0 deletions week-3/2-functions-data-structures/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Tuesday - Functions and data structures

## Before lesson materials

Mandatory:

* [General introduction to functions][1]
* [Introduction to Python built-in data structures][2]

Optional:

* [Hands-on Python Tutorial: Defining Functions of your Own][3]
* [Codecademy course on Python functions][4]
* [Codecademy course on Python lists and dictionaries][5]

## Tasks

### Functions

* Function basics
* Stateless functions
* Side effects
* Recursion
* Exercises:
Write a function for:
1. "Say hi" in different languages, defaulting to English
2. Calculate circumference of a circle
3. Calculate the first n numbers in the Fibonacci sequence

### Data structures

* Discuss the importance of data structures
* Implement our very own linked list (led by instructor)
* Basics
* Append
* Insert
* Remove
* Go over the Python built-in basic data structures
* List, stack, queue
* Set
* Dictionary
* Daily project: fun with lottery numbers
1. Print the five most frequent numbers and how many times they have occurred
2. Gather all the individual numbers that were drawn

If there is time left:

* Graphs
* Figure out how to build a binary tree

[1]: http://www.cs.utah.edu/~germain/PPS/Topics/functions.html
[2]: http://pymbook.readthedocs.org/en/latest/datastructure.html
[3]: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/functions.html
[4]: https://www.codecademy.com/en/courses/python-beginner-c7VZg/0/1?curriculum_id=4f89dab3d788890003000096
[5]: https://www.codecademy.com/en/courses/python-beginner-en-pwmb1/0/1?curriculum_id=4f89dab3d788890003000096
Loading

0 comments on commit 3edcf11

Please sign in to comment.