
COMP1010 Week 7 Quiz
Authored by Ethan Ryoo
Computers
University
Used 3+ 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
30 sec • 1 pt
Which number(s) will this code print?
0 only
1 only
0, 1, 2
1, 2, 3
2.
FILL IN THE BLANKS QUESTION
30 sec • 1 pt
A user enters the numbers 5 and -2. What does line 3 print?
(a)
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which line(s) in this code correctly print(s) five asterisks in a row (*****)? Multiple options may be correct.
Line 1
Line 2
Line 3
Line 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of x on line 5?
4
5
None
The code breaks since there is no else clause
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which statement is true regarding line 6?
It behaves similarly to my_func(1)
It enters an infinite loop
It prints nothing because my_func returns None
It prints -1
6.
FILL IN THE BLANKS QUESTION
1 min • 1 pt
Refer to Image A. There is one error in the function mth_to_season. On which line is it located?
(a)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Refer to Image B. Which of these data structures is useful for converting months into seasons?
X only
Y only
Both can be useful
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?