Note that all codes files have been renamed so I can post them on web
so the file blah.py will be renamed blah_py. To run
programs you should rename them after you get them back to having
the .py extension.
| Week
| Material
| Notes
|
| 1
| Updated: Sec 07 Group Assignments
| (in pdf) Information about class groups and group schedules.
|
| 1
| The face.py file written in class
| I added a few features:
- added comment at top with my name
- modified functions to assume that the turtle always starts down
at the chin with a facing that points up into the face
(pre-condition) and ends at same place (post-condition)
- added comments to functions with pre/post conditions, describing
the state of the "world" before/after the functions run
- added reset before drawing to erase screen
- added an input line at the bottom so when the program is
run from the command line (using the command
python3 face.py it stops before finishing so grader
can evaluate it.
|
| 2
| smile & tree
| code developed in class
|
| 3
| hypno, iteration,
| code developed in class
|
| 4
| strings & files
| code developed in class
|
| 6
| insertion sort and binary search
| code developed in class
|
| 7
| greedy change
| code developed in class
|
| 8
| myList
|
I finished implementing the pop and wrote the
insert and addAfter
functions, which I
didn't get to in class.
Note: there are two versions of the myList code:
- myList_py
Which is similar to what we wrote in class. This code had a bit of a
issue with the addAfter function. To add an element to
the list I had to increase the size of the list. But since the function
only took an iterator, we didn't have access to the list, so the
function had to be changed to take the list as a parameter.
- myList2_py
Which has a major change to the iterator. Here I made a class for the
iterator, which kept track of the loc and a reference back to the list.
This cleaned up the code for addAfter, eliminating the
extra list parameter (since now the iterator keeps track of what list it
is associated with).
|
| 9
| myBST
|
myBST_strt_py the starting point for
the code I wrote for class
NEW/Updated
|