Difference between revisions of "IB Computer Science I"
From WLCS
Line 4: | Line 4: | ||
* [[Pig Latin Translator]] | * [[Pig Latin Translator]] | ||
* 2nd Quarter Exam Review | * 2nd Quarter Exam Review | ||
+ | ** Variables, expressions, and statements | ||
** Functions | ** Functions | ||
+ | *** function header | ||
+ | *** function definitions | ||
+ | *** function calls | ||
+ | *** parameters | ||
+ | *** return statements | ||
+ | ** Conditionals | ||
+ | *** Boolean values and variables | ||
+ | *** modulus (%) operator | ||
+ | *** comparison operators (e.g., <, >) | ||
+ | *** logical operators (e.g., and, or) | ||
+ | *** Boolean conditional expressions (e.g., 2 > x and y < 3) | ||
+ | *** if statements | ||
+ | *** if-elif-else statements | ||
** Iteration (looping) | ** Iteration (looping) | ||
*** while and for loops | *** while and for loops | ||
*** counter variables | *** counter variables | ||
+ | *** infinite loops | ||
*** break | *** break | ||
** Strings | ** Strings |
Revision as of 14:18, 7 January 2009
Wednesday - (1/7/09)
Agenda:
- Demo any missing work
- Pig Latin Translator
- 2nd Quarter Exam Review
- Variables, expressions, and statements
- Functions
- function header
- function definitions
- function calls
- parameters
- return statements
- Conditionals
- Boolean values and variables
- modulus (%) operator
- comparison operators (e.g., <, >)
- logical operators (e.g., and, or)
- Boolean conditional expressions (e.g., 2 > x and y < 3)
- if statements
- if-elif-else statements
- Iteration (looping)
- while and for loops
- counter variables
- infinite loops
- break
- Strings
- [] operator
- len() function
- string slices
- string traversal (strings + loops)
Monday (1/5/09)
Warmup:
- Describe in three words what you did over winter break
- Assume you have the following code:
i = 0
n = 0
while n < 90:
i = 0
while i < 10:
n += 3
if n > 50:
break
i += 1
n += 1
- What is the value of n after the above code executes? DO NOT USE YOUR COMPUTER.
Agenda: