Types of questions
|
- factual knowledge: TRUE/FALSE, multiple choice
TRUE or FALSE: In Scratch, it is possible for sprites to coordinate their actions by sending and receiving broadcasts.
- conceptual understanding: short answer, discussion
The history of computers can be divided into generations based on advances in computer technology. Describe one such transition. Be sure to name both the old technology and the new, and describe specific features of the new technology that helped to make computers faster, cheaper, and/or more reliable.
- synthesis and application: explain/debug code, trace/modify code
Consider the folowing Python function:
def mystery(a, b):
while a > b:
print "Howdy"
a = a + 2
How many lines of output would be printed as a result of the call mystery(2, 11) ?
|
Course material
|
Overview & history
hardware vs. software, von Neumann architecture
historical generations
mechanical -> vacuum tube -> transistor -> IC -> VLSI -> parallel/networks
evolution of programming
machine language -> assembly language -> high-level language
Programming in Scratch
programming concepts
simple actions: move, turn, next-costume, ...
repetition: forever, repeat, ...
conditional execution: if, if-else, repeat-until
logic: =, >, <, and, or, ...
arithmetic: +, -, *, /, ...
sensing: touching?, key-pressed?, ...
variables: set, change-by, ...
coordination: broadcast, when-I-receive, ...
Programming in Python
Python interpreter, IDLE shell
data types
numbers (int, long, float), operators (+, -, *, /, **, %)
strings, concatenation (+)
variables
variable names, naming conventions, reserved words
assignment statements, shorthand assignments
functions
parameters, return statements, doc strings
built-in functions (print, abs, max, min)
modules, import statement
random module (randint, choice), math module (sqrt, floor, ...)
conditional execution
if statement, Boolean operators (<, <=, >, >=, ==, !=, and or, not)
if (1-way), if-else (2-way), cascading if-else, elif (multi-way)
repetition
for loops, counter-driven
range function, sums & counters
while loops, condition-driven
infinite (black hole) loops
|