Question
You must implement three functions from the Required Functions, . In some cases, these functions are already defined in Racket (DrRacket). To avoid confusion, you
You must implement three functions from the Required Functions, . In some cases, these functions are already defined in Racket (DrRacket). To avoid confusion, you can name yours differently, for example myreverse for reverse. Or you can just override the built-in definition. You may use other builtin functions, such as if, cond, car (first), cdr (rest), and cons in your functions. But you may not, of course, use a builtin function in your answer for that same function. (must be in real code)
You must implement all three of these mathematical functions on integers.
1. Check if a number is perfect: a number is perfect if the sum of its factors other than itself is equal to itself. (perfect? 5) => #f (perfect? 6) => #t
2. Check if a number is abundant: an abundant numbers sum of factors other than itself is greater than the number. (abundant? 5) => #f (abundant? 12) => #t
3. Check if a number is deficient: a deficient numbers sum of factors is less than itself. (deficient? 5) => #t (deficient? 12) => #f
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