Question: Please complete the below function in LISP ; isLeapYear determines if the year represents a valid leap year using ; the following algorithm: ; if
Please complete the below function in LISP
; isLeapYear determines if the year represents a valid leap year using ; the following algorithm: ; if year is evenly divisible by 400 it is a leap year ; otherwise if the year is evenly divisible by 100 it is NOT a leap year ; otherwise if the year is evenly divisible by 4 it is a leap year ; otherwise it is NOT a leap year ; it returns true (t) if it is a leap year, false (nil) otherwise ; error checking: returns nil if year is not an integer (defun isLeapYear (year) ; isLeapYear returns true (t) if year is a leap year, false (nil) otherwise ; ----- starter skeleton code, just returns true ----- t )
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
