Problems for Lesson 2

Problem 2.1 – Arithmetic

Write down a Racket expression that corresponds to the traditional expression (2×3)-(1+0).

Problem 2.2 – Computing with Arithmetic in Racket

Show all the steps starting with the Racket expression from problem 2.1 to arrive at the result 5. Use Racket notation for intermediate expressions, and write -> (a dash followed by a greater-than sign) between steps.

Problem 2.3 – Function Definitions

Translate the definition

  f(x) = max(x,5)+min(x,6)

Problem 2.4 – Substitution

Using the definition of f from problem 2.3, show all the steps starting with the Racket expression (f 4) to arrive at the result 9.