final_review_questions

final_review_questions - for x in range(3): for y in...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 8 - Final Review Chapter 4.5 - Dictionaries Know the operators for Dictionaries Tell the result of an expression involving a dictionary Tell the output of code involving a dictionary You will NOT need to write code using a dictionary dictionary = {'A':10, 'B':12, 'Z':16, 'M':20} Tell the value of each expression: dictionary['B'] dictionary['Z'] + 10 dictionary.keys() dictionary.values() 'C' in dictionary Chapter 5.1-5.2 - Files How do you open and read in a file? Translate between for loop and while loop tell the output of code using a while loop Write code using a while loop Write the following as a while loop: for x in range(3,10,2): print(x) for item in dictionary: print(item) Chapter 6-6.3.2,6.5 - Images How do you load in an image, create an image and display the image in the window? Tell the output of nested loops Draw the output of this nested loop: for x in range(3): for y in range(5): print(x+y)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for x in range(3): for y in range(5): print('*',end="") print() for x in range(3): for y in range(x): print(' ',end="") for y in range(3-x): print('*',end="") print() Be able to write a single function of similar difficulty to lab 9 and project 4 Be able to take copy pixels from one image to a new one and change something about it Be able to make a color filter Draw a picture Guaranteed to be on the exam (though not necessarily exhaustive) Tell the output of a sequence of code with nested control / while statements and/or code in different objects. Write a function that involves images Tell the results of several expressions involving strings, lists, dictionaries Translate between while loop and for loop Write a function involving strings and/or lists Guaranteed NOT to be on the exam Write a function involving dictionaries Recursion of any form...
View Full Document

Page1 / 2

final_review_questions - for x in range(3): for y in...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online