Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Untitled 2 - DrRacket* File Edit View Language Racket Isert Tabs Help Untitled 2 (define... #lang racket (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 da (read-line)) (newline) (check-year)) (define (check-year) (cond (and(> year 999) (

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.