NEW
Font size
WorksheetsCalling Procedures
Total questions: 5
Worksheet time: 5mins
Which one of the following is NOT an input to this procedure or an output from this procedure?
highGrade
passingGrade
count
testGrade
What can replace “<missing condition>” so that the procedure will display true if both the temperature is between 80 and 95, inclusive, and it is sunny and will display false if it is raining?
The parameter “a” is the temperature. The parameter “b” is a Boolean, true if it is sunny and false if it is raining.
Examples:
mystery [90, true] would display “Pool Party on Flag Day ”
mystery [90, false] would display “Pool Party is Cancelled”
mystery [100, true] would display “Pool Party is Cancelled”
mystery [95, false] would display “Pool Party is Cancelled”
(a ≤ 80 ≥ 95) AND (b = true)
(a ≥ 80 ≤ 95) AND (b = true)
(a ≥ 80) AND (a ≤ 95) AND (b = true)
(a ≤ 80) AND (a ≥ 95) AND (b = true)
What will the following procedure display where “num” can be any integer (e.g., 0, 1, 2, 3, 4 …) ?
All numbers from 0 to num
All numbers from 0 to num with the exclusion of numbers divisible by 5
All numbers from 1 to num
All numbers from 1 to num with the exclusion of numbers divisible by 5
What will the following call to the procedure display?
stressed
desserts
list1
backronym
What will price contain after running the following code segment?
[4, 8, 2, 12]
[20, 40, 10, 60]
[40, 80, 20, 120]
[20, 80, 10, 120]
