-->
assignments
1. getting started
due Thu Sep 3
- Your main goal for this week is to be able to run python programs.
- You should also
- read chapter 1 in the textbook,
- learn to use a unix command terminal,
- and tell me about what you did.
- Here are all the specifics.
2. simple programs
due Mon Sep 7
3. objects & graphics
due Thu Sep 10
- Here is a longer description of the assignment.
- The short version is:
- Read chapter 4 in the text, and my notes & videos.
- Get either Zelle's graphics.py or my drawing.py working.
- Do exercise 3 in chapter 4, drawing a face.
- Explain and give examples of "class", "instance", "method", "argument".
- Do the sol_lewitt_lab.
- Tell me how all this is going for you.
4. lists, strings, and files
due Mon Sep 14
- Read chapter 5 in the text, and check out my notes & videos.
- Do these programming exercises from this chapter :
- 4 (acronyms) or 5 (name sum)
- 7 (on the Caesar cipher) - optional: 8 (continued; trickier)
- 12 (formatted numbers), and
- 14 (read and summarize a file)
- Here are some hints
- Connect with Jim or one of the tutors in an one of the online zoom sessions to explain what you did on one of these exercises, and to get some feedback. Tell me who you worked with and on which exercise.
- As always, be smart about the time and effort spent on this stuff. If it feels like too much, focus your attention on a few. If it's fast, turn up the juice on an aspect that you find interesting.
5. functions
due Thu Sep 17
- Read chapter 6, my corresponding notes, and check out my videos.
- Describe briefly the following notions, and give a code example.
- return value
- local variable
- global variable
- argument
- Do programming exercise 2 from chapter 6, writing a program that prints (the ants song). (My "functions part 2" describes a similar program.)
- Do programming exercises 11 through 14 from chapter 6 (ending with the sum of squares of numbers from a file).
- Re-write any program you did in a previous assignment, modifying it to use functions and docstrings. Optionally, add doctests too. :)
6. decisions, booleans, while
due Mon Sep 21
- Browse through the material in chapters 7 and 8, which is all related. You don't need to master all of it, but do make sure you understand at least "if" statements, comparisons, and while loops.
- Look at my corresponding notes and three videos.
- Do the following two programming exercises :
- chapter 7, exercise 6 (the speeding ticket)
- chapter 7, exercise 12 (date validation)
- And do these two math-y exercises; both will need loops or loops-within-loops, if statements, and (probably) helper functions.
- Please do ask for clarification, hints and/or assistance from Jim or the tutors as needed.
7. start group project
due Thu Sep 24
- Start your group project, the STOP game. (I've also posted a video describing it.)
- Describe how you have organized the work for the project, what you personally are doing to start, and what you have done so far.
- Read chapter 9 in the textook, "simulation and design", and check out my notes. (The material in this chapter is about how to work on a project ... I'm assigning this now to give help you think about how to approach the "STOP game". )
- Do one coding exercise: chapter 9, programming exercise 7, simulating craps. (See the notes I mention above.)
8. group project - 1st version
due Mon Sep 28
- Turn in a first draft of your group project.
- Everyone should do this on their own homework page, even though they have only written some of the code.
- Explain what you have done, what is (and isn't) working, and show an example of the program running.
- Start looking at chapter 10 & 11 in the texbook, on writing classes (objects). I'll have a video and some exercises due next Thursday.
9. group project - final version
due Thu Oct 1
- Turn in the final draft of your group project.
- Everyone should do this on their own homework page, even though they have only written some of the code.
- Include
- the code and its documentation (please use docstrings)
- an example showing what you see when you run it (copy and paste terminal text, or screenshots)
- a write-up describing how the whole things works and what your contributions are. Also include all your sources: what assistance you got from tutors or classmates, and what you found online that helped.
- Do look at my comments from the first draft, and try to incorporate those ideas.
- Also please start learning how to create your own python objects :
- Start reading chapter 10
- Check out my notes and video
- Do exercise 11 in chapter 10, the playing card.
10. final project proposal & data structures
due Mon Oct 5
- Propose a final project.
- Read chapter 11 on data structures and check out my notes & video.
- optional: read chapter 12 (more practice with objects)
- Write a BlackJack simulation with objects for the cards, deck, hand, and game, using my generic_card.py example as a template. The specifics are up to you, but I have in mind something like exercise 15 in chapter 11. You could for example find the probability of going over 21 with a three card hand. Or simulate a game between a dealer (a computer player who for example always takes a card if the total is under 16) and the user. The main point is to understand how to use objects, including objects that include other objects.
11. recursion
due Thu Oct 8
- Browse chapter 13 - algorithms and recursion, and look at my notes & video.
- Work on your final project.
- Do at least one of the following exercises :
- Draw a fractal tree using turtle graphics, drawing a Y with smaller Y's branching outward. You can use my similar turtle_recursive_curve.py as a starting point. Here's a screenshot of that. And if you need more help, you can find check out Abhinav Mahapatra's discussion.
- Do chapter 13, exercise 9, the C curve (similar to the Koch curve in my notes).
- Do chapter 13, exercise 3, the recursive palindrome checker.
12. final project - first draft
due Mon Oct 12
- Turn in a first draft of your final project.
13. final project due
due Thu Oct 15
- Submit your final project.
- Schedule a zoom time with Jim to discuss it.
14. course evaluation
due Sun Oct 18
- a place for Jim to leave a course evaluation