what is the error occured? how can i put if the statement true of false? the que
ID: 3707514 • Letter: W
Question
what is the error occured? how can i put if the statement true of false?
the question that i want to do is to know weather the input value of year month and date is correct or not
Explanation / Answer
(define year "")
(define month "")
(define day "")
(define (check-available)
(display "Please enter year: ")
(define yr (read-line))
(newline)
(display "Please enter month: ")
(define mon (read-line))
(newline)
(display "Please enter day: ")
(define day (read-line))
(newline)
(check-year))
(define (check-year)
(cond(and?(year 999) (<= year 9999))
( display "VALID")))
You have missed a question mark (?) after and . That is why it is showing syntax error. You must use the ? , as you are evaluating the value as true/false. So inside the cond() you have to use ? after every and/or expression.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.