Assignments
[Note: this webpage last modified Thursday, 08-Dec-2011 22:45:02 EST]
Homework assignments will be posted to this website.
Homework assignments
are due by 11am one week after handed out (so you
have one week to complete them). If you turn in the assignment late, I
will grade it so you know how you did, but it will count as a 0.
You should email your homework solution to me at
jkinne@cs.indstate.edu before it is due.
For each assignment, please download the template file by right-clicking on
the the link, and choosing
"Save target as" or "Save link as" (or whatever your browser calls it).
You should
put your answers into this file, and then turn in this file as
an attachment to an email. If you do not
turn in your homework in this way, I will take off points!
hw0.py
hw1.py
hw2.py
hw3.py
hw4.py
hw5.py
hw6.py
hw7.py
hw8.py
hw9.py
hw10.py
hw11.py due before 3pm December 15. You
should do it before the exam since it will be good practice. It is
set to be due by Dec 15 because that is the later of the two exams.
As mentioned in class, the grade formula will be come "drop lowest 2" instead
of "drop lowest 1". Regardless, you will be better off to do this
homework.
Project grade 0: Email your project code to Jeff before
class on December 6th. It will be graded as a "project checkin". You should
have made progress since we last looked at the project. You should
follow the guidelines below in terms of comments, etc.
Project presentation: In class on either December 6th or during
the exam slot (we'll put a schedule up in week or two), you will give a
short (5 minute) presentation of your project. This will include giving
a demonstration of what the project does and explaining some parts of the
code. I will post more detailed instructions later. The presentation
will be graded and will count as part of your project grade.
Expectations for the presentation:
Each group will have approximately 5 minutes. You should first
describe your project in a few sentences and give a demonstration.
You can hook up your own computer to the projector or use the
one that is there. After giving the demonstration, you should go through
some parts of the code. In particular if you are using anything
(e.g., pygame) that we have not seen in class, you should explain how it
works. You can expect questions from Jeff as you present. Your
fellow classmates are also encouraged to ask questions if something
comes to their mind.
For the presentation grade, you will be graded on the quality of your
presenting only, not on the quality of your program. So, remember to
speak loudly and clearly, and explain in a way that is easy for your
classmates to understand. Your intended audience for the presentation
is your classmates, not Jeff (i.e., you cannot assume the audience has
already seen your project, and assume your classmates' speed of
understanding, not Jeff's).
Final project due: The completed project will be due
before December 18.
Email it to Jeff before the end of that day. Follow the guidelines below.
Exam 2: We will have a final exam during the exam period
allocated to this class. It will cover everything from the semester.
But it will not cover images, turtles, or tkinter. You can attend
the exam slot for either section of the course (the tests will be
different).
Project
We have discussed instructions for the project in class. Here are a few
things to remember.
- You can do anything you want for the program, but it must be
"complicated enough". Another way to phrase that is that it must use
enough of the concepts we have learned. Your program should (eventually)
use loops somewhere, use multiple functions, and use lists or dictionaries.
- YOU MUST CITE ANY SOURCES YOU USE. Copying code from somewhere and not
citing it as a source is plagiarism, as has been discussed before in
relation to homeworks.
- The project turnins are graded according to the information
under "Grading Programs" in the syllabus. Go look at that now.
- You should have comments at the top of your file describing what the
file is and what your project does. Here are items that should be
included: authors of the code (you and your partners), what the program
is supposed to do, how to run the program (e.g., load the file and then
run xyz function), what the status is (what is working, what is not, etc.),
and what you are still trying to get working.
- You should have enough comments throughout the file to make it easy to
understand and read. You should view writing a program as having
components that are similar to writing a paper in one of your humanities
classes. It should be logically laid out and easy to follow. In general,
if you should probably have a comment line at least every 10 lines of code
(though this varies - I normally would have a comment line at least every
5 lines of code).
- You should use functions! In general, you should not have a single
bit function with 100-ish lines of code. Each function should do something
that makes sense (e.g., get the user's name and information, update
where the turtle is on the screen based on xyz, ...). Normally, if you
put things into separate functions that belong in separate functions, each
function will be less than 50 lines of code. Having your code separated
out into functions (in a way that makes sense) also makes it easier to
read your code!
- Your code better run! If you send me code that has an error and does
not even run, you can expect a VERY low grade.
Assignment ideas
(So I remember, some things we might have HW assignments over, also
project ideas...)
-
Nifty Assignments
- Something that would be useful for someone: learning games for
kids, something to do with disabled or impaired (e.g., voice commands,
or a reader), math teacher.
- Interpretor for simple programming language or assembly/machine language.
- Encryption/decryption.
- Planetary simulator.
- Fractal drawer.
- Financial calculator (interest, mortgage, ...).
- Arithmetic game, typing game.
- Plotting a graph, solving equations.
- Painting application.
- Dealing with sounds (clipping, splicing, echoes, volume, ...).
- Dealing with videos (animation, splicing, etc.).
- Compression.
- Pygame.
- Networking, urls.
- Picture toolkit. Here are some additional picture effects you could
"easily" do using similar functions that we used in class. The function
to start with is the grayScale function. It goes through each pixel in
the image and makes the pixel gray.
- Change the range of the x and y that are changed - rather than the
whole image, just some part of it. This will be some rectangle in
the image. You could also include an extra if to just select a
circle, corner, or other shape.
- Make the picture black and white. That would be setting the
pixel to all 255 or all 0 depending on the average of the red+green+blue
there was before.
- Similar to doing black and white, you could also make a picture
sepia toned.
- Red eye removal. By looking at just a rectangle around the eyes in
a picture, you could select the pixels with the right "red" color
by using an if, and change those to black.
- Other changes like red eye. You could select out other colors to
change in an image for interesting effects - change someone's skin
color to be green, change the green on trees and grass to be purple,
etc.
- Fading. For making many of the changes, you could make them gradual.
For example, make an image that gradually changes from normal color on
the left to grayscale on the right.
- Just about anything that is in normal picture editing programs,
you might be able to do. You can also incorporate some of the turtle
stuff and some of the image stuff together.