CSC108H1_09SUMMER1_608

Unauthorized reproductiondistribution is strictly

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: so use at your discretion. cont’d. . . 5 CSC 108H1Y JUNE 2009 Midterm Exam ID: 1680 Te st Do wn lo ad er ID : ID : 16 80 29 85 Test Question 3. 5 298 r ID: ade nlo [6 marks] Dow 85 : 29 ID er ad lo wn Do The function below makes a picture look like it was taken at sunset. Test ID: 1680 import media Test ID: 1680 80 : 16 ID Te st def make_sunset(pic): Te st ID : 16 80 for pixel in pic: Dow nlo ade r ID: 298 5 Do wn lo ad er ID : 29 85 Dow nlo ade r ID: 298 # get pixel’s old green value green = media.get_green(pixel) 5 Do wn lo ad er ID : 29 85 16 ID : ID : st Te om # set pixel to new green value media.set_green(pixel, int(green * 0.7)) 168 0 80 Tes t ID: 80 16 y. c 0 168 t ID: Tes 16 80 Do wn lo ad er 29 85 : ID : de nt bu dd ID : 29 85 st # get pixel’s old blue value blue = media.get_blue(pixel) Te st 5 298 r ID: ade nlo Dow Do wn lo ad e r ID # set pixel to new blue value media.set_blue(pixel, int(blue * 0.7)) Part (a) [3 marks] Tes t ID: 168 0 Downloader Test ID: ID: 2985 1680 st Te : ID 80 Dow nlo ade r ID: 298 16 ID : Do w nl oa de ut or r ID : on 80 16 85 st ID : 1680 Test ID: Te st to Te .s tu 5 29 80 16 The...
View Full Document

This note was uploaded on 11/27/2010 for the course CS 108 taught by Professor Paulgries during the Spring '08 term at University of Toronto- Toronto.

Ask a homework question - tutors are online