Question: ( cond ;; Check if course has no dependents and credit is 3 [ ( and ( course ? c ) ( equal ? 'LOC

(cond
;; Check if course has no dependents and credit is 3
[(and (course? c)(equal? 'LOC0(course-dependents c)))
(courses-w-credits c 3)]
;; Check if the course list has no dependents
[(and (list? c)
(null?(course-dependents (first c))))
(map (lambda (course)(courses-w-credits course 3)) c)]
[else
(filter-an-odd (map (course-number c)(fn-for-loc c)))]))])) ; actually the question ask course has no dependents AND course-number list has an odd and course-w-credits >=3, so your suggested coding is not correct

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!