Question: Please do these by hand and not by the Scheme Environment. Evaluate the following expressions ( each worth 3 points ) : ( car (

Please do these by hand and not by the Scheme Environment.
Evaluate the following expressions (each worth 3 points):
(car (d g t))
(cdr (p g r s))
(car ((purple 1)( green 2)))
(cdr ((performances 3)( size-of-hall 250)))
(car (cdr (( silver gold)(oil vinegar))))
(cdr (car (( #\a #\b)(cd))))
(cdr (car (cdr (((smith35)(brown26))((jones45)(marsh43))))))
(car (cdr (car ((1 b )(1 d)))))
(car (cdr (car (cdr ((rooms 3.5)(floor 4th)(available january 1))))))
(car (cdr (cdr (cdr ((a b)(c d)(e f))))))
Write the sequence of CARS and CDRs that will pick the symbol CHAIR out of the following lists (each worth 5 points):
(table lamp chair shelf)
((table lamp)(chair terminal))
(terminal (shelf)(( chair))((( sofa ))))
(((( table) file-cabinet) chair ) telephone)

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 Programming Questions!