Question: Can someone help me with this LISP assignment, #3 and #4 please LISP Programming Assignment It is a good idea to start this assignment early;
Can someone help me with this LISP assignment, #3 and #4 please


LISP Programming Assignment It is a good idea to start this assignment early; Lisp programming, while not inherently difficult, often seem somewhat foreign at first, particularly when it comes to recursion and list manipulation. This assignment is loosely based on material by Dr. Henri Casanova. Make sure you have extensive comments! Problem #1 Define a function that takes two arguments and returns the greater of the two. Problem #2 Write a function called inches that accepts feet and inches and returns the equivalent length in centimeters. If x is the first argument and y is the second, the formula is 2.54(12x +y). For example, USER (1)inches 0 1) 2.54 USER (1)inches 6 2.5) 189.22999999999999 Problem #3-Remove an element from a list using iteration Write a Common Lisp function called my-remove that takes an atom and a list in input, and returnsa list that is identical to the input list, but with elements equal to the input atom removed, if any. Examples of the function in operation are shown below (user input is in red): CL-USER (1): (my-remove b '(a bc b d)) (a c d) CL-USER (2): (my-remove 'b '(a cd e f)) (a cde f) CL-USER (3): (my-remove'a '(b (a d) a d)) (b (a d) d) CL-USER (4): (my-remove 'a' nil Problem #4-Remove an element from a list using Recursion LISP Programming Assignment It is a good idea to start this assignment early; Lisp programming, while not inherently difficult, often seem somewhat foreign at first, particularly when it comes to recursion and list manipulation. This assignment is loosely based on material by Dr. Henri Casanova. Make sure you have extensive comments! Problem #1 Define a function that takes two arguments and returns the greater of the two. Problem #2 Write a function called inches that accepts feet and inches and returns the equivalent length in centimeters. If x is the first argument and y is the second, the formula is 2.54(12x +y). For example, USER (1)inches 0 1) 2.54 USER (1)inches 6 2.5) 189.22999999999999 Problem #3-Remove an element from a list using iteration Write a Common Lisp function called my-remove that takes an atom and a list in input, and returnsa list that is identical to the input list, but with elements equal to the input atom removed, if any. Examples of the function in operation are shown below (user input is in red): CL-USER (1): (my-remove b '(a bc b d)) (a c d) CL-USER (2): (my-remove 'b '(a cd e f)) (a cde f) CL-USER (3): (my-remove'a '(b (a d) a d)) (b (a d) d) CL-USER (4): (my-remove 'a' nil Problem #4-Remove an element from a list using Recursion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
