; Intermediate Student or higher. Doesn't require any teachpacks. ; can-vote? : number => boolean (define (can-vote? age) (>= age 18)) "Examples of can-vote?:" (can-vote? 17) "should be false" (can-vote? 18) "should be true" (can-vote? 97) "should be true" ; voting-message : string => string (define (voting-message text) (local [(define age (string->number text))] (cond [(not (number? age)) (format "I don't understand ~s; the age must be a number." text)] [(>= age 18) (format "~s is old enough to vote. Congratulations!" age)] [(< age 18) (format "~s is NOT old enough to vote yet." age)]))) "Examples of voting-message:" (voting-message "18") "should be \"18 is old enough to vote. Congratulations!\"" (voting-message "17") "should be \"17 is NOT old enough to vote.\"" (voting-message "p3n890") "should be \"I don't understand \"p3n890\"; the age must be a number.\""