Question: can you please answer all parts to the questions (JAVA code please ) and can you as well send screenshots of the code you did




Page of 2 | 0 CSC240 Racket Lab 1 Exercise 1 Convert the following arithmetic expressions into Scheme expressions and evaluate. a. 1.2 (2 - 1/3) +-8.7 b. (2/3+4/9) - (5/11 - 4/3) c. 1+1 = (2+1+(1 + 1/2)) d. 1 -2 X 3 X 4 X 5 X-6 x 7 Exercise 2 Draw how the expression / (+54) (-8 (23))) is executed using a stack based architecture. Exercise 2 Draw how the expression (/ (+54) (-8(*2 3))) is executed using a stack based architecture. Exercise 3 Writing Functions: 1. Write a function, c->f, that will convert celsius to fahrenheit. F = 19/5) * C + 32. 2. Write 3 functions, discrim, quad+, and quad-. Each function will have 3 parameters: a, b and c -b+Vb2-4ac that represent the coefficients of a quadratic equation X = discrim will be the 2a the part of the formula: b-4ac. Both quad+ and quad- will use the discrim function. 3. Write a function solutions, with 3 parameters: a, b and c that represent the coefficients of a quadratic equation. Evaluate the discriminant, b-4ac, and return a string the appropriate stating: Discriminant - 0 String "two imaginary solutions" "one real solution" "two real solutions" 4. Write a function, quadrant, with 2 parameters: Xandy that represent coordinates of a point in a Cartesian coordinate system (x,y). Determine which quadrant the point is located in and return one of the following: 1, II, III, IV, x-axis, y-axis or origin b-4ac0 b -4ac > 0 one real solution "two real solutions" 4. Write a function, quadrant, with 2 parameters: x and y that represent coordinates of a point in a Cartesian coordinate system (x,y). Determine which quadrant the point is located in and return one of the following: 1, II, III, IV, x-axis, y-axis or origin. Submit on Canvas, a Scheme or Racket source file with Exercise 3 functions. Document each exercise. Exercise 1 Convert the following arithmetic expressions into Scheme expressions and evaluate. a. 1.2 (2 - 1/3) +-8.7 (+(* 1.2 (-2 1/3)) -8.7) -6,699999999999999 b. (2/3 + 4/9) + (5/11 - 4/3) (+2/3 4/9) (- 5/11 4/3)) -1 23/87 c. I +1 (2+1+(1+1/2)) +1 (1+2 (71+1 1/2))))) 1 3/8 d. IX-2 x 3 x 4 x 5 x-6 x 7 (* 1-2 3-4 5-6 7) -5040 Exercise 2 Draw how the expression / (+54) (-8(*23))) is executed using a stack based architecture. 5 5 2 8 4 9 9 0 00 3 6 2 2 4 1/2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
