Question: (Scheme language) how to turn these math statements into (define (lambda (params) ...) please do it using lambda. Part 1 - Warming up to Scheme
Part 1 - Warming up to Scheme with some ridiculous math Translate the following math statements into a function that takes no parameters and returns the value of that math statement. Create a function for each ca1led run1, run2, run3, run4 and runs (run1) should return the answer to problem 1; i.e. translate 1+2+3 into scheme, (run2) should return the answer to problem 2, etc. 1) 4+5+6 2) 5(4+5)/2 3) 100((20/5)(33))+(120/10) 4) 5(4+(((10+10)+(58))/(10+2))) 5) (((()(3+5)(6+4))/2)/2)5)/3)+((((2+10) +(54))/2)+(45)) The graders should be able to run each of these as: (run 1 ) (run 2 ) etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
