13. Exercises C

  1. below-10-or-above-50?: number -> boolean. True if the number is either below ten or above fifty.

  2. Craps is an old dice game. Simplified rules: you win if you roll a 7 or an 11. Write win-craps?: number -> boolean.

  3. Write a function roll-2-dice: number(ignore) -> number that gives the total from rolling two standard six-sided dice.

  4. Write the function play-craps: number(ignore) -> boolean that plays one round of craps (randomly) and returns true when it is a win.

  5. Write not-blue-triangle?: image -> boolean that is true only if the image is not a blue equilateral triangle (of any size).

  6. Stripes. Create a pattern of red, green, and blue diagonal stripes, each 50 pixels wide.

Last modified August 18, 2023: 2022-2023 End State (7352e87)