
Maximum Digit Finder Quiz
Authored by John Streety
Computers
10th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the pseudocode procedure findMaxDigit, which is intended to return the maximum digit in the integer num. For example, if num is 294, findMaxDigit returns 9 because 9 is the maximum digit in 294. What should replace the missing code segment to ensure findMaxDigit works as intended?
num / 10 + 10
num % 10
num * 10
num + 10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following function: void drawTriangle () // print a line break after each print statement print "*" print "**" print "***" print "****" end drawTriangle What would happen as a result of calling drawTriangle()?
****
**********
* ** *** ****
* ** *** ****
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedure header: int getSum(int num1, int num2, int num3) Which procedure call is valid?
getSum("A", 96, 95)
getSum(94.5, 96, 95)
getSum(96, 95)
getSum(getSum(92, 93, 95), 96, 95)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following pseudocode procedure and procedure call: void practicePassing( pass-by-reference int X, pass-by-value int Y) Y = X / 2 // Division symbol uses integer division X = X + 3 print X, Y end practicePassing Int i = 2 Int j = 3 practicePassing( i, j) print i, j What would print as a result of executing the code?
4 1 4 3
4 1 2 3
6 1 6 3
4 1 2 1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following pseudocode procedure: void changeTemp( boolean airFlowing) int currentTemp = 68 if (airFlowing = = true) currentTemp = currentTemp + 2 else print “A/C is off” end if end changeTemp What happens for the method call changeTemp(true)?
“A/C is off” is printed
An error prevents it from executing
The variable currentTemp is increased to 70
“A/C is off” is printed and the variable currentTemp is increased to 70
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which pseudocode procedure is used to draw a circle on a coordinate grid?
drawSquare
drawCircle
drawLine
drawRectangle
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the coordinates of the center of the first circle in the correct pseudocode?
(3, 6)
(5, 4)
(7, 2)
(2, 3)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?