-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Welcome to the python-ots wiki!
The format we've agreed on is:
That involves an install-party on the Friday evening (optional if the student already has python installed on her/his laptop), and then a Saturday afternoon introduction for absolute beginners (content to be discussed below). Contrary to the Rails Girls and JSFAB workshops there won't be anything happening on the Sunday. We will need as many coaches as possible for that week-end event in order to help the students as much as possible. If we feel the need that introduction week-end could be run on a regular basis.
After that initial introduction week-end we will run workshops every week or every two weeks on specific topics and/or tasks that we can do in Python. We are thinking of having them on a fix week day in the evening, starting with a max 2h workshop, followed by another hour of questions (on the workshop of the day or follow-up questions on the previous workshops). Everyone with at list a basic understanding of programming in Python (either those who attended the week-end introduction or anybody with the same or higher level) is welcome to those follow-up events. The topics will be depending on the coaches available that week (topics to be discussed below).
Write here any tasks/exercises/ideas on how to teach that concept
-read file containing different products with price and category assigned; sort products by price; find the cheapest product in each category; calculate mean price for all categories; write result in a new file; (file encoding???)
The Boston Python Workshop - the format is inspired by the RailsBrigde-Workshops and they provide detailed materials of their past workshops. As an example we could look at the Boston Python Workshop 6. It has the following elements:
-
setup (Python, texteditor, dependencies fro projects) (https://openhatch.org/wiki/Boston_Python_Workshop_6/Friday)
-
a self-directed tutorial (https://openhatch.org/wiki/Boston_Python_Workshop_6/Friday/Tutorial)
-
a lecture and hands-on exercises section (https://openhatch.org/wiki/Boston_Python_Workshop_6/Saturday_lecture)
-
projects (https://openhatch.org/wiki/Boston_Python_Workshop_6/Saturday_projects)
-
CodingBats - programming exercises and quizzes on the occassions (http://codingbat.com/home/bostonpythonworkshop@gmail.com/Friday, http://codingbat.com/home/bostonpythonworkshop@gmail.com/SaturdayMorning, http://codingbat.com/home/bostonpythonworkshop@gmail.com/Saturday)
The Head First books use a couple of principles to help people learn and remember stuff. We could use the stories, they wrap around the tasks to make them more interesting. There is a free sample of the Python book available.
- Interactive work (arithmetic expressions, string concatenation, print statement, module imports)
- Simple drawing with Turtle (forward, left/right, reset, width/color)
- Draw a rectangle
- Draw one/many tilted rectangles
- Other figures: triangle, house, hexagon/honeycomb
- Names (variables, assignments, user input)
- Draw parametrized triangles/tilted rectangles
- Calculate average grade
- User-defined functions (function definition, modules)
- Isolate triangle drawing, with global variable
- Write a quiz framework (conditional branching)
- Write a quiz framework, with scores (globals, multiple branches)
- Parametrize hexagon for honeycomb
- Functions with parameters (function arguments)
- Parametrize triangle drawing
- Parametrize rectangle drawing (multiple arguments)
- Jump with the turtle
- Parametrize tilted triangle drawing (default arguments)
- Print a soap opera (string formatting)
- Generalize drawing functions into a single function with a type argument for rectangles, triangles, squares
- Print a numeral from a user-supplied number between 1 and 100
- Print a greeting card
- Draw a right-angled triangle, and a house in one stroke from that
- Loops (for loops through collections, range function)
- Draw a dashed line
- Rephrase all draw functions with loops (lists)
- Draw a spiral of rectangles
- Draw a n-sided shape
- Draw rosettes (fill)
- Formulate a better version of the quiz, now with a collection of questions
- Conditional loops (while loops, debugger)
- Draw a polygon which turns until it hits normal orientation again (modulo, tracer)
- Find the minimum amount of numbers beginning from 1 which sum up to at least 1,000
- Find the smallest number for which (1.0/n)*n != 1.0
- Find the number of divisions by 2 until a number, say 1, hits zero
- Guess the number -- a game (random numbers)
- Generate a random number and get user input until she hit the correct number with lesser/greater than hints
- Guess the number automatically
- Throw a dice
- Find the number of random pairs that need to be generated until both items are the same
- Functions with values (return statement, null values)
- Write a function returning rectangle area/circumference
- Return a string of the supplied length,
row(7) -> "IIIII II"
- Factorial
- Write a table-evaluating function,
table(collection, func) -> func(c) for c in collection
(functions as objects) - Benchmark a function (clock function)
- Bonus: Draw a tree through recursion
Collection of short tutorials from a guy who's teaching python to his son.
python4kids.wordpress.com (Go here and scroll down to get to the beginning)
http://www.dcl.hpi.uni-potsdam.de/teaching/pt1/
- Representation of information, numbers, text
- Programming languages (categories and formal representation)
- Algorithms and specifications
- Subroutines
- Exception handling
- Construction of new datatypes
- Verification
- Version control
- Object-oriented programming, classes, abstract datatypes
- Exercises
- Find all divisors of a number
- Factorial
- Find all prime factors of a factorial
- Sum the first natural numbers
- Approximate a number's square root (Heron)
- Ackermann
- Read the passwd file, search through it
- Print/evaluate an AST
- Implement a doubly-linked list
Projects are a way to pack the single programming concepts into something that is closer to the real world and more fun. They can be small enough to be included in the initial introduction week-end event or big enough to become one of the follow-up workshops.
Turtle graphics is a popular way for introducing programming. It can be used to explain the core programming concepts like variables, loops, conditionals and functions.
Examples:
- Seven ways to use Python's new turtle module - Slides / Video
- Collection of turtle demos
Twitter has a search API which returns the tweets in JSON format. Some programming concepts can be explained by calling the API and analyzing the results.
- Using the Standard Library (urllib, json)
- Lists, Dictionaries
- Conditionals, loops, list comprehensions
- Handling strings
- Recursion
** Linguistics / text analysis / information retrival ** - http://nltk.org/
http://biopython.org/ - Biopython is a set of freely available tools for biological computation written in Python by an international team of developers. Biopython Tutorial and Cookbook
PsychoPy is the Psychology Software in Python for presentation of stimuli and collection of data for a wide range of neuroscience, psychology and psychophysics experiments. Can be used for creating experiments with EyeTracker, NIRS, Skin Conductance Response.PsychoPy