Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help, trying to complete this by tonight to help me study for my exam, bu

ID: 3840625 • Letter: P

Question

Please help, trying to complete this by tonight to help me study for my exam, but I am stuck after trying many times.

SCHEME Give a short answer for each of the following questions. 1. If we evaluate the following expressions, as Scheme would, what would be the result? (define x 3) (define y 10) a. (list x y) b. (list x y) 2. Define a function to compute the cube of a number 3. Define a function that takes a list of numbers and returns a list of their square roots. Thus (sarts 1.0 2.0 4.0) should return (1.0 1.41421 2.0 (Hint: the answer to the question about how to calculate a square root is a built-in function called sqrt and yes, you can use map

Explanation / Answer

2 Ans) - Let a be a number whose cube we want to calculate

- Here calculate_cube is the function to calculate cube of number a

- Cube of a number is obtained by multiplying the number with itself 3 times.

  

3 Ans) Function to calculate square root of list of numbers in C

double Calculate_sqrt(int a[],n) /* a is the list consisting of n elements whose square root we want to find out

{double p;

for (i=0;i<n;i++)

{ p=sqrt(a[i]); /* sqrt is the function to calculate sqyare root of a number available in C language

printf("%lf",p);}

1) a. (3 10)

b. ('3' 10)