A Warmup for LISP This is MinorPP #1. Note: You will need to complete the material in the LISP section to complete this assignment. Write a LISP program that creates two variables, a and b. The...

1 answer below »
its an Artificial Assignment. it needs to be done in LISP language!!


A Warmup for LISP This is MinorPP #1. Note:  You will need to complete the material in the LISP section to complete this assignment.  Write a LISP program that creates two variables, a and b.  The program should then bind (assign) the list (w x y z) to variable a and then bind (assign) the list (2 4 6 8) to variable b. Then, using only variables a and b, write LISP S-expressions (statements) to generate the following lists: (z y x w) (14 y (x 4)) ((w x y z) . 2) (((w y) (2 4)) . w) ((w 2) (x 4) (y 6) (z 8)) Print each of these lists on the screen using the print function.   You can work on this assignment in a group of up to three people.   If you do, each student must submit a copy of the assignment and you must include in comments at the top of the file the names of all three people who worked on it. Hints:  · You can complete this assignment using any of the tools found on the tutorialspoint website,  even stuff not covered in the videos.  · The assignment can probably be completed using just car, cdr, cons, print, and the arithmetic operators. · Feel free to use any secondary sources.  This assignment assumes (requires) you to do some research on your own. Submission Instructions: · Submit your program in a single plain-text source file. · Do not submit screenshots. · Name your file hw05a.lisp
Answered Same DayApr 03, 2021

Answer To: A Warmup for LISP This is MinorPP #1. Note: You will need to complete the material in the LISP...

Valupadasu answered on Apr 04 2021
158 Votes
;Names of the students X,Y and Z
(setq a '(w x y z))
(setq b '(2 4 6 8))
(print (reverse a))
(pr
int (append(cons (reduce '+ (cddr b)) (cons (caddr a) nil) ) (cons (cons (cadr a) (cons (cadr b) nil))nil)))
(print (cons a (car b)))
(print (cons(cons (cons(car a) (cons (caddr a) nil))(cons...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here