This is the P2PU Archive. If you want the current site, go to www.p2pu.org!
This course will cover the fundamental aspects of the Python language. Each week we will approach a new learning topic in a collaborative way. We will come together to explore practice excercises and to create challenges for our classmates and future students of this class.
eBook: Python for Informatics http://www.py4inf.com/book.php
Week one will focus on introductions. We will introduce ourselves and then begin getting our introduction to Python syntax in the python shell.
We will continue our studies with a look at the basic building blocks of programming. We will use Python as an advanced calculator, store information in variables, and look at boolean logic.
This section will explore loops and logical flow control, such as if statements. We will construct simple loops to manipulate and iterate through letters and numbers.
We will take our previous excercises and wrap them in their own function definition for code reuse. We will touch base on the philosophy of Object Oriented Programming (OOP) and the Don't Repeat Yourself (DRY) principle.
Python has several core data types, containers for certain kinds of inforation. We will cover, perhapse earlier in the course than at this point, the following data types:
Python has a great ability to search for patternshttp://p2pu.org/general/node/27948/edit?destination=node%2F27947%2Fdocument in data with a tool called Regular Expression (regexp.) Regular Expressions have a bit of a learning curve and we will begin with a gentle ascent by finding simple text patterns.
If the course has time, we will touch base on a power tool called the List Comprehension. List comprehensions are loops and expressionss that are wrapped in a list, wherein the output becomes the list.
Decorators are like badges that we pin on to function and method declarations. We will explore why these badges are more "Pythonic" than alternative methods.