CS 111 - Program Design I
Fall 2016 - Multi-Media Section
Exam Topics
Final Exam
- Wednesday 12/7/16 from 3:30pm to 5:30pm
- In LC-A1
- Python Language
- variables
- Assignment statements and arithmetic operators
- Loops
- If statements
- relational operators, boolean operators
- Function writing
- Lists
- 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
- Access part of the list (sometimes called a sub-list)
- list3 = [ 4, 6, 12, 5, 9, 8, 10, 3, 12, 5 ] # creates a list
- list4 = list3 [ 2, 6 ] # creates a new list of values from positions 2, 3, 4 & 5
- 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] # this line should be indented
- Character Strings
- These are really just lists of characters treated as a single word (with a few exceptions)
- String creation
- word1 = "Hello"
- word2 = "" # the empty string (contains no characters)
- String joining/concatenation
- String indexing
- print (word1[0]) # can't update a single character
- Substrings (access part of the string)
- word4 = word3[2:6] # create a new string from the
- Sound Manipulation
- Sample location ( our sounds had 22050 samples per second )
- Sample values ( in range from -32768 to 32767 )
- String Algorithms
- changing the volume
- combine two sounds together to play concurrently (at same time)
- join two sounds together to play in sequence (second after the first)
- fade-in or fade-out of a sound
- create a "sound byte" from a sound (crop a sound)
- reverse a sound
- increase a sound's pitch
- decrease a sound's pitch
- normalize a sound
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:
x | y | | | x and y | x or y | not 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
- 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
- comments
- indentation
- use of functions
- function definition
- function parameters
- function calls
- for loops
- 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
--
troy - 2016-09-22
Comments
This topic: CS111
> WebHome >
CS111Fall2016 > ExamTopicsF16
Topic revision: r7 - 2016-12-01 - 14:44:00 - Main.troy