Design a function prettyprint that consumes a string and an
Solution
The five design recipe components
Purpose: Describes what the function is to compute.
Contract: Describes what type of arguments the function consumes and what type of value it produces.
Examples: Illustrating the typical use of the function.
Definition: The Racket definition (header and body) of the function.
Tests: A representative set of function arguments and expected function values.
----------------
; ; (pretty-print \"a \" : b) produces an image of the text that results by appending the integar b to the end of the string a.
; ; (pretty-print \"a \" : b) String Int -> String
; ; Examples :
(check-expect (pretty-print \"Number Of accounts : \" 2) Number of accounts : 2
(check-expect (pretty-print \"Width of room (metres): \" 4) Width of room (metres) : 4
(define my-content my-num)
(list (append (cons my-content empty) (cons my-num ()))) //we have appended int and string to a list
(text list 18 \"magenta\")
; ; Tests :
//here let us test for the image height which should be of 18 points, note that image-height returns it in pixels, and
//1 pixel = 1.25 points
(check-expect (image-height (pretty-print \"Number Of accounts : \" 2) ) 22.5)
----------------------------------
that will be the required code
--------
