Question
Consider: BSL Racket has a function named modulo, that can be described as follows: Assume you have defined a named constant SCENE-HT , to be
Consider: BSL Racket has a function named modulo, that can be described as follows:
Assume you have defined a named constant SCENE-HT
, to be used as the height of sunset scenes in your program.
Assume that you have written a function with the function header:
And, assume that its function body includes within it the compound expression:
Which of the following can you also safely assume?
Group of answer choices:
a) The value of (modulo sun-y-position SCENE-HT)
can never be 0.
b) The value of (modulo sun-y-position SCENE-HT)
might be SCENE-HT
.
c) The value of (modulo sun-y-position SCENE-HT)
is guaranteed to be an integer in the range [0, SCENE-HT)
d) The value of (modulo sun-y-position SCENE-HT)
might be an integer greater than SCENE-HT
; signature: modulo: number number -> number ; purpose: expects an integer dividend (numerator) and an integer divisor (denominator), and it returns the integer REMAINDER from the integer division of that dividend and divisor (that is, (modulo 6 3) returns 0, because there is no integer remainder from 6 / 3 -- that is, 6 / 3 is 2, with a remainder of 0 (modulo 7 4) returns 3, because there is an integer remainder of 3 from 7/4 that is, 7 / 4 is 1, with a remainder of 3 (modulo 21 2) returns 1, because there is an integer remainder of 1 from 21 / 2 -- that is, 21 / 2 is 10, with a remainder of 1)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The value of modulo sunyposition SCENEHT can never be grea...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