
CMU Unit 2 Practice Test
Authored by Joshua Ottoson
Computers
10th - 12th Grade
Used 34+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following would be a legal function call for the given function definition for drawWords()?
drawWords(20,'blue)
drawWords(100, 100)
drawWords('blue', 'red')
drawWords('blue',20)
Answer explanation
The first parameter is color and the second parameter is a fontSize. So the order must be color then number. Only drawWords('blue',20) follows this order.
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following are parameter(s) of the function drawWords() from question 1?
color
fontSize
color and fontSize
None of the above
Answer explanation
Parameters are the name of the variables that receive a value and can be used in the functions code. They are located in between the parenthesis in a function definition. Here, there are two parameters separated by a comma: color, fontSize
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following are argument(s) of the Label function call inside the drawWords function definition?
r.centerX, r.centerY, and r
color, True, and r
r.value and color
None of the above
Answer explanation
Arguments are the specific values in a function call. Here, it says the function call is to the Label function (line 4). The following are arguments of the Label function call: r.value, r.centerX, r.centerY, fill=color, bold=True, and size=fontSize. Since none of the answer choices had all correct arguments, the answer was none.
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be displayed on the screen when we call func()
I pity the
foo
foo I pity the
I pity the foo
Answer explanation
When we call func(), the first line of code in the definition is line 5. This is a function call to foo, so the program jump to line 1 and runs the foo() function. The foo function prints 'I pity the '. Then the program jumps back to line 5 and continues from there. It prints 'foo' on line 6 and is done.
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many shapes are drawn in the code shown?
4
7
8
12
Answer explanation
Each function call to drawShapes() will draw 4 shapes: a star, a regular polygon, a rectangle, and an oval. Since we call drawShapes() function 3 times on line 8, 9, and 10, a total of 12 shapes will be drawn: 3 stars, 3 regular polygons, 3 rectangles, and 3 ovals.
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is not a valid property of rectangles?
right
bottom
translation
fill
Answer explanation
All shapes have the following properties: left, right, top, bottom, centerX, and centerY, width, height, fill, border, borderWidth, opacity, dashes, rotateAngle, visible
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Both circles in the following image have a red fill. What could be the opacity of the circle on the left?
10
15
30
55
Answer explanation
The circle on the left is more visible, which means that its opacity value is higher. The higher the opacity value, the more visible a shape will be. An opacity of 100 means that the shape is fully visible(normal) and an opacity of 0 means that the shape is not visible.
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?
Similar Resources on Wayground
15 questions
Javascript Quiz 2
Quiz
•
11th Grade
20 questions
Computer parts
Quiz
•
1st - 12th Grade
15 questions
ICT – 10 SUMMATIVE TEST – Q4
Quiz
•
10th Grade
15 questions
1.1 Computer Systems Essential Knowledge
Quiz
•
9th - 12th Grade
15 questions
TLE SUMMATIVE TEST G10
Quiz
•
10th Grade
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
12 questions
website design elements
Quiz
•
12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Elijah McCoy: Innovations and Impact in Black History
Interactive video
•
6th - 10th Grade