Midterm I Review CS 115 | Saelee Agenda 1. Exam mechanics & - - PowerPoint PPT Presentation

midterm i review
SMART_READER_LITE
LIVE PREVIEW

Midterm I Review CS 115 | Saelee Agenda 1. Exam mechanics & - - PowerPoint PPT Presentation

Midterm I Review CS 115 | Saelee Agenda 1. Exam mechanics & coverage 2. Grading policy (aftermath) 3. Path forward 1. Exam Coverage Arithmetic of numbers, booleans, strings, and images Variables Functions: usage, composition,


slide-1
SLIDE 1

Midterm I Review

CS 115 | Saelee

slide-2
SLIDE 2

Agenda

  • 1. Exam mechanics & coverage
  • 2. Grading policy (aftermath)
  • 3. Path forward
slide-3
SLIDE 3
  • 1. Exam Coverage
  • Arithmetic of numbers, booleans, strings,

and images

  • Variables
  • Functions: usage, composition, definition
  • Special forms: define and if
slide-4
SLIDE 4

Numerical Arithmetic

  • Translation of infix ↔ prefix forms
  • Exact vs. Inexact numbers
  • Order of precedence?
  • Basic operators + mathematical functions

(e.g., sqrt, expt, numerator, denominator)

slide-5
SLIDE 5

Boolean Arithmetic

  • Generating functions:
  • Relational operators (e.g., =, <, >, <=,

string=?)

  • Predicates (e.g., string?, image?)
  • Essential operations: and, or, not
slide-6
SLIDE 6

Arithmetic of Strings

  • Representation (e.g., "hello")
  • String functions:
  • string-append
  • string-length
  • string-ith
slide-7
SLIDE 7

Arithmetic of Images

  • Image generating functions (e.g., circle)
  • Image querying functions (e.g., image-length)
  • Image manipulation functions (e.g., overlay,

above, below, etc.)

  • No need to memorize functions, but given

description should be able to use them!

slide-8
SLIDE 8

Variables

  • Definition and Usage
  • Vocab: “binding”
slide-9
SLIDE 9

Functions

  • Application and Composition
  • application = applying function to inputs
  • composition = “stacking” functions on

top of each other

  • Definition and corresponding Usage
slide-10
SLIDE 10

Function Definitions

  • Vocab: “arity” — # of inputs
  • Local variables
slide-11
SLIDE 11

Conditional “if ” form

  • Standalone if form
  • Understand as expression!
  • Nested if expressions
slide-12
SLIDE 12
  • 2. Grading policy
  • First midterm = growing pains
  • If you blow a midterm, you can still do well
  • Any better subsequent exam score will

count for itself and replace the worse score

  • So if you score 100% on final, you get

100% on all exams

slide-13
SLIDE 13
  • 3. Path forward
  • See updated schedule
  • After exam:
  • Design recipe (and testing)
  • Animation
  • “Batch” and “Universe” programs