Question: Write a scheme function that gives you the average of a list and if the list contains a letter replace it with zero. (Course: Programming

Write a scheme function that gives you the average of a list and if the list contains a letter replace it with zero. (Course: Programming languages)

Note: please don't solve it with coding.

I've attached an image similar to the question(above) so you can get an idea what i mean.

Write a scheme function that gives you the average of a list

Deline the following functions: a. (pad x ) returns the list x in which each zero element is replaced by the previous non-zero element in the list. Any leading zeros will remain unchanged. b. (aprog x ) returns True if list x is an arithmetic progression and false otherwise first) can be Recall that an arithmetic progression is a sequence in which each element (except the firfserence. obtained from the previous one by adding a fixed value called the common difference difference here is 3 ). (6 marks) Answer: ( debine (pad x ) (cond (mule? x ) (lecx) (sec(cosx)0) (log(ccosx)

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!