I.1 Semester I Review 1

Random shape. Drift to a new position. Reduce the amount of green.
  1. Random shape. Write a function that returns a square, circle, or triangle. All should be equally likely.
random-shape: ignore -> image
  1. Drift. A smiley face starts at some position on the screen. It randomly drifts 5 pixels in some direction (up, down, left, or right) every 0.2 seconds. Write the function that gives its new position.
drift-to-new: posn(old) -> posn(new)
  1. Reduce green. Write a function less-green that reduces the amount of green in a color by 25%.
less-green: color -> color
Last modified August 18, 2023: 2022-2023 End State (7352e87)