Workshop_4

# Workshop_4 - Workshop 4 February 2nd 2012 Summary of...

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Workshop 4 February 2nd, 2012 Summary of Workshop- Go over Quiz answers- Picture Worksheet (if not done last week with the class)- One function: solving it with multiple solutions - How to load pictures into JES- Review how to present pictures on JES (2 ways)-explore() vs. show()- Conditional Picture Transformations (based on rgb and location)- recoloring based on RGB values- Extra: Luminance, old test question (picture tracing) Notes for students- Corrections on Quizzes go to your workshop TA first. If it's a bigger issue it can go to Kelsey (Head TA).- Hw01 due Feb 3 rd (tomorrow)- New MP2 coming soon...- Exam 1 - February 10th (next Friday) There Are Many Ways to Get to Rome If you haven't noticed yet, there are plenty of ways to do a single coding problem. There should be no reason for anyone to have similar code with all this flexibility! Try this exercise: Break into large groups Each group has two minutes to come up with as many ways to write the following coding problem. The group with the most wins! Problem: You need to figure out if the weight of a given person will keep a boat afloat. If the weight is above 150, the boat sinks. If it is at or below 150, it will stay afloat. The print statements should say "You sink!" or "You float!", respectively. If it is an invalid weight (negative) it should say "You can't weigh that much!" Function: float() Parameter: weight Return: None 2 Ways to Load Pictures to JES setMediaPath() vs. pickAFile() setMediaPath()- directs JES to the folder that the picture is located in. **Make sure you do not double click into the folder. Just click it once and hit "Open" at the bottom. pickAFile() the function makePicture(filename) takes in a filename. pickAFile() is a fruitful function that returns a filename. This is why you have been taught to do makePicture(pickAFile())....
View Full Document

{[ snackBarMessage ]}

### Page1 / 16

Workshop_4 - Workshop 4 February 2nd 2012 Summary of...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online