drracket

;; Skye has written the following expression, and expects it to produce
;; “hahaha”. Instead, there is an error. Please correct the expression below
;; so that it produces “hahaha”.
;; First uncomment the expression, then run the file, and CAREFULLY READ AND
;; CONSIDER THE ERROR MESSAGES YOU GET. Use those error messages to guide you
;; to fix the error.
;; When you are done, do NOT add the semi-colon back to the beginning of the
;; line, UNLESS your expression still produces an error.
;; Remember the Help Desk can be used to access documentation on primitive
;; functions.

(replicate ha 3)

;; Skye has now written a function that is supposed to produce the given image
;; with a caption underneath it. Please correct the expression below so that
;; it correctly produces a blue circle with the text “Blue Circle” under it.
;; First uncomment the expression, then fix it.
;; Do NOT change the function definition, just uncomment the expression after
;; the function definition, and fix that expression. When you are done, do
;; NOT add the semi-colon back to the beginning of the line, UNLESS your
;; expression still produces an error.

(define (give-caption img cap)
(above img
(text cap 15 “dark gray”)))

;(give-caption “Blue Circle” (circle 40 “solid” “blue”))

;; Write a single top-level expression that produces the image shown in
;; pset-01-starter-image.jpg. Note all of following:
;; – the rectangle must have dimensions 200×100
;; – the triangles must be “blue” and the rectangle must be “red”
;; – look in the helpdesk for 2htdp/image for other functions you will need

;; NOTE: Do not attempt to solve this problem until you have covered
;; the How to Design Functions (HtDF) design recipe in lecture.
;; Design a function called taller-image that consumes two images and produces
;; the image that has the greater height.
;; Note that the template origin tag for a function that consumes two images is:
;; Image)
;; and the template itself is:
;; (define (taller-image i1 i2)
;; (… i1 i2))

taller-image) ;Uncomment this line when you start the problem.