Problem Set 2

home work!

Programming Language BSL

Purpose The purpose of this problem set is to practice developing simple and conditional functions. The functions deal with atomic forms of data (numbers, symbols, images).

Finger Exercises HtDP/2e: 13, 18, 19, 20, 21; 30, 31; 61, 64

image

Problem 1 Design favorite-star. Given the side-length of a pentagon, the color of the star, and a length sq-len, it places an appropriately sized and colored star in the middle of a square of the given length sq-len.

Problem 2 HtDP/2e; exercise 43.

Problem 3 HtDP/2e: exercise 45.

Problem 4 People consider a climate humid if the average humidity is above 65%; in contrast, when the humidity is below 20%, people say it is dry. For percentages in between those two, people find it comfortable.

Design a function that translates measured percentages of humidity into words that describe human sensations.