CSC 221: Computer Programming I
Test 1 Review


Wed, Oct 5
  • The test will include extra points (Mistakes Happen!), e.g., 52 or 53 points, but graded on a scale of 50.

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) ?
Study advice
  • review online lecture notes
  • review online texts (if not mentioned in class, won't be on test)
  • look over quizzes, homework assignments
  • reference other sources for examples, different perspectives
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