TWiki
>
CS111 Web
>
CS111Fall2016
>
ExamTopicsF16
(2016-12-01, Main.troy)
(raw view)
E
dit
A
ttach
---+ 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 * range statement * If statements * relational operators, boolean operators * Function writing * parameters * return values * Lists<br /> * 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 ) * 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 ]<br /> for i in range (0, len (list1) ):<br /> 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 * word3 = word1 + " there" * 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: <font face="Bitstream Vera Sans Mono, Andale Mono, Courier, monospace"><span style="font-size: 12.22px;">equality inequality</span></font> < <= > >= * boolean operators: and or not * truth tables: <table border="1" cellpadding="0" cellspacing="1"> <tbody> <tr><th align="center" valign="middle">x</th><th align="center" valign="middle">y</th><th align="center" valign="middle">|</th><th align="center" valign="middle">x and y</th><th align="center" valign="middle">x or y</th><th align="center" valign="middle">not x</th></tr> <tr> <td align="center" valign="middle">true</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">|</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">false</td> </tr> <tr> <td align="center" valign="middle">true</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">|</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">false</td> </tr> <tr> <td align="center" valign="middle">false</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">|</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">true</td> <td align="center" valign="middle">true</td> </tr> <tr> <td align="center" valign="middle">false</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">|</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">false</td> <td align="center" valign="middle">true</td> </tr> </tbody> </table> * 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 <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> *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 * range() function <p> </p> * 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 <p> </p> <p> </p> <p> </p> <p> </p> -- %USERSIG{troy - 2016-09-22}% ---++ Comments %COMMENT%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r7
<
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r7 - 2016-12-01 - 14:44:00 - Main.troy
CS111
Web Page Spr 18
Syllabus Spr 18
Lecture Notes Spr 18
Sample Code Spr 18
Assignments Spr 18
[edit this menu
]
Log In
CS 111 Main Page
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
ABOUT US
Our Department
Recent News
Contact Us
ACADEMICS
Prospective Students
Undergraduate
CS Minor
Graduate
Courses
RESEARCH
Overview
By Faculty
Labs
PEOPLE
Faculty
Adjuncts
Staff
Students
Alumni
Copyright 2016 The Board of Trustees
of the University of Illinois.
webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF