[Note: this webpage last modified Friday, 04-Feb-2011 19:44:51 EST]
Something cool about CS, something you can do with CS...
Or, is there a problem in the book you'd like to talk about?
Check about seeing quiz, homework "attempts" from gradebook, otherwise looking for a workaround...
Grades from HW1 and "total" grade
How to turn in HW's, and in particular this one - a Python file.
Model solution from HW1.
If want to turn in early so you have a better idea by Tuesday about this course, then I'll grade it early.
Change when homework is due?
Coming next week - course survey.
Last time - functions in Python (the whole point of programming - being able to reuse work you have already done) and looking at and changing the values of pixels (using getPixel, getRed, getGreen, getBlue, setRed, setGreen, setBlue).
Today - using for loop to modify all pixels in a picture.
Note about using functions - difference between variable being in the command area and being inside of a function.
Note about using functions - how does Python know when your function is done? When there is a line of code that is not indented.
Example of for loop to do something to all pixels in the picture. Things to remember - for keyword, in keyword, colon after for (just like with defining a function), indentation (two spaces more than the function).
A few examples.
Call explore(pic) to open Picture Tools for picture pic, repaint(pic) to redisplay a picture that has been changed.
What is an array - just a sequence of some type of object, like an array of pixels, an array of numbers, a string is an array of characters/letters.
writePictureTo to save the result, using pickAFolder.
Sample code from this lecture and last lecture online
For next time - more playing with loops to do things to pictures.
And make sure to take the quiz, and type things into JES to try them out!