Question: (eproblem 2) Given the definitions below (LO, HI, and foo), write the step-by-step evaluation of this expression: (foo (2 + 16 15))) Be sure to

 (eproblem 2) Given the definitions below (LO, HI, and foo), writethe step-by-step evaluation of this expression: (foo (2 + 16 15))) Besure to show every intermediate evaluation step, including the original expression and

(eproblem 2) Given the definitions below (LO, HI, and foo), write the step-by-step evaluation of this expression: (foo (2 + 16 15))) Be sure to show every intermediate evaluation step, including the original expression and the final result. Your steps must not be commented out. (define LO 50) (define HI 100) (define (foo x) (if x Lo) "too low" (if (> x HI) "too high" (string-append "all good:"(number->string x)))) pset-01-starter.rkt- DrRacket File Edit View Language Racket Insert Iabs Help pset-01-starter.rkr (define ) (eproblem 3) Ali has written code including a function to make rectangles of their favorite color. But there is one mistake in the code that you need to fix First uncomment the code below, and then fix the mistake. Note that there is only one mistake and your fix should preserve the functionality that Ali has worked hard on. : (define COLOR "purple") : (define (pretty-rect w h) :(rectangle w h "solid" CoLOR)) (pretty-rect 20 30 "purple") pset-01-starter.rkt DrRacket File Edit View Language Ragket Insert Iabs Help pset-01-starter.rkr Syntaxe. StepH Run (define ) (pretty-rect 20 30 "purple") (@problem 4) Design a function called order that consumes two integers and produces a message saying what order they come in. For example: (order 5 3) should produce "3 then 5" (order 2 6) should produce "2 then 6" You will want to use the number->string primitive. Your design must follow all applicable recipes,and must include all appropriate etags. Solutions which "just work" but do not follow the design recipes will receive few if any marks :(@htdf order) Uncomment this line when you start the problem. (eproblem 2) Given the definitions below (LO, HI, and foo), write the step-by-step evaluation of this expression: (foo (2 + 16 15))) Be sure to show every intermediate evaluation step, including the original expression and the final result. Your steps must not be commented out. (define LO 50) (define HI 100) (define (foo x) (if x Lo) "too low" (if (> x HI) "too high" (string-append "all good:"(number->string x)))) pset-01-starter.rkt- DrRacket File Edit View Language Racket Insert Iabs Help pset-01-starter.rkr (define ) (eproblem 3) Ali has written code including a function to make rectangles of their favorite color. But there is one mistake in the code that you need to fix First uncomment the code below, and then fix the mistake. Note that there is only one mistake and your fix should preserve the functionality that Ali has worked hard on. : (define COLOR "purple") : (define (pretty-rect w h) :(rectangle w h "solid" CoLOR)) (pretty-rect 20 30 "purple") pset-01-starter.rkt DrRacket File Edit View Language Ragket Insert Iabs Help pset-01-starter.rkr Syntaxe. StepH Run (define ) (pretty-rect 20 30 "purple") (@problem 4) Design a function called order that consumes two integers and produces a message saying what order they come in. For example: (order 5 3) should produce "3 then 5" (order 2 6) should produce "2 then 6" You will want to use the number->string primitive. Your design must follow all applicable recipes,and must include all appropriate etags. Solutions which "just work" but do not follow the design recipes will receive few if any marks :(@htdf order) Uncomment this line when you start the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!