Tuesday jan 26
submitting homework
- Make sure everyone can log in and edit pages in wikiacademia
- You can paste code in with tags, or upload files.
today's homework
bugs
- Devin's C link error
- Ian's python "is" error
- My python print error
- ... more ?
aside: embedding code in wiki
Examples:
# python
def product(x,y):
return x*y
print "Is %i * %i = %i " % (5, 3, product(5,3))
; lisp
(defun product (x y)
(* x y))
(format t "Is ~s * ~s = ~s ~%" x y (product 5 3))
/* c */
#include <stdio.h>
int product(int x, int y){
return x*y;
}
printf("Is %i * %i = %i \n", x, y, product(x, y))
next
basic python language constructs
- conditionals
- loops
- functions
- input/output
- documentation
intermediate python constructs
- exceptions
- lists , tuples, dictionaries
- mutable vs immutable
- objects
- overriding behaviors
- __str__
- iterators
- decorators (we won't get that far)
testing
- doctests module, and how it works
- unit tests : functions, inputs, testable outputs
for next week
- where are you folks in all this?
- maybe ... another few problems from projecteuler.net?
- perhaps in an object oriented form ??