Question: Programming language please with steps 2. Define the following functions in Scheme: a. (increase x ) returns True if list x is sorted in increasing
2. Define the following functions in Scheme: a. (increase x ) returns True if list x is sorted in increasing order and False otherwise. (5 marks) Example: (increase ' (12l3) ) evaluates to #t (increase ' (120) ) evaluates to \#f. b. (avg x ) returns the average of all numbers in list x or 0 if there are no numbers. ( 7 marks) Example: (avg ' (5b21t4)) evaluates to 2 . Hint: Use the predicate number? to test if an element is a number or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
