Question
Racket - Scheme 'ludicrous' - the input to this function is a single integer. The output is a boolean (either true #t or false #f),
Racket - Scheme
'ludicrous' - the input to this function is a single integer. The output is a boolean (either true #t or false #f), indicating whether or not the input number is "ludicrous". A number is deemed to be "ludicrous" if every one of its digits is even, or if every one of its digits is odd. For example, (ludicrous 8126) would return #f, because one digit is odd while the others are even. As another example, (ludicrous 315) would return #t, because every digit is odd. Similarly, (ludicrous 860) would return #t (true), because every digit is even. You'll probably need to use the modulo function, and you'll probably also need integer division, which can be found in Racket's help facility.
(define (ludicrous x))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started