TWiki> CS111 Web>CS111Fall2016>ExamTopicsF16 (revision 6)EditAttach

# CS 111 - Program Design I

Fall 2016 - Multi-Media Section

### Exam Topics

Final Exam

• Python Language
• List creation
• list1 = [ 0, 0, 0, 0, 0 ]
• list2 = range (0, 5) # creates the list of [ 0, 1, 2, 3, 4 ]
• List indexing
• list1[i] = 7
• print ( list2[3] )
• List Length
• len ( list1 )
• Loop to access all values in a list
• list1 = [1, 2, 3, 5, 8, 13 ]
for i in range (0, len (list1) ):
val = list1[i]
• Sound Manipulation
• Sample location ( our sounds had 22050 samples per second )
• Sample values ( in range from -32768 to 32767 )

Exam 2

• Python Language
• for loops
• range ( ) function
• range ( val )
• range ( val1, val2 )
• range ( val1, val2, val3)
• if statements
• if <condition> :
• elif <condition> :
• else :
• relational operators: equality inequality < <= > >=
• boolean operators: and or not
• truth tables:
xy|x and yx or ynot x
true true | true true false
true false | false true false
false true | false true true
false false | false false true
• return statements
• Picture Manipulation
• Pixel format
• red, green, blue in range from 0 to 255
• x position in range from 0 to width-1
• y position in range from 0 to height-1
• Color Modification Algorithms
• Lighten
• Darken
• Color Negation
• Grayscale
• Color Scale
• Posterization
• Blend two pictures together
• color comparison: distance ( )
• red-eye reduction
• green screen
• edge detection
• Position Modification Algorithms
• Mirror (flip vertically)
• Flip horizontally
• Flip diagonally
• Rotate: 90, 180, 270
• Crop
• Duplicate Horizontally
• Duplicate Vertically (stack)
• Increase Size
• Decrease Size

Exam 1

• Python Basics
• variables
• types of values
• assignment statements
• arithmetic operators
• ( )
• * / %
• + -
• string operators
• * repeating
• + concatenation/joining
• precedence
• programming style
• meaningful variable name
• blank lines
• indentation
• use of functions
• function definition
• function parameters
• function calls
• for loops
• range() function

• Turtle Drawing
• Drawing on Worlds
• makeWorld ( )
• makeTurtle ( )
• Drawing on Pictures
• pickAFile
• makePicture ( )
• makeTurtle ( )
• show ( )
• writePictureTo ( )
• Turtle Functions - turtle given a first parameter: function (t)
• forward ( )
• turn ( )
• penUp ( )
• penDown ( )
• getXPos ( )
• getYPos ( )
• moveTo ( )
• Turtle Methods - turtle.method( )
• setPenColor ( )
• getPenColor ( )
• Colors
• makeColor (redAmount, greenAmount, blueAmount)
• predefined colors
• black
• white
• blue
• red
• green
• darkGray
• lightGray
• yellow
• orange
• pink
• magenta
• cyan

--