CSC 221: Introduction to Programming
Test 1 Review

Thu, Oct 4
  • 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
  • conceptual understanding: short answer, discussion
  • synthesis and application: explain/debug code, trace/modify code

  • see Sample Test 1
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 of programming early devices: Jacquard's loom, Babbage's analytical engine hardware evolution: relays --> vacuum tubes --> transistors --> circuits stored program computers von Neumann architecture (CPU, memory, I/O devices) 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, float), operators (+, -, *, /, //, **, %) strings, operators (+, *) Booleans (True, False) type function, conversion (int, float, str) 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, ...) turtle module (forward, left, right, ...) I/O print function mixing text and variables, separating spaces input function prompt message, converting input to a number 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 simulations & modeling coin flips, dice rolls, game of Pig image manipulation nested for loops, Pixel & Image objects