
Section A Quiz
Authored by Harmeet Kaur
Computers
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict the output of
x, y = 3, 8;
print((y % x == 2) and (y // x > 2))
True
False
0
Error
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Determine the final value of a after executing:
a = 4;
a += True + (5 != 7)
5
6
7
Error
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which statement will raise an exception?
eval('3+7')
int('4.6')
float('10')
str(45)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Output of the function call
def calc(x, y=2, z=3): return x*y+z;
print(calc(3, z=4))
10
9
7
Error
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Identify the correct way to define a function that accepts an arbitrary number of positional arguments.
def f(args):
def f(*args):
def f(**args):
def f[*args]:
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Predict the output
E1 End
E2 End
End E1
Error
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In Python, using `raise` without specifying an exception name re-raises the __________ exception.
TypeError
Last active exception
None
RuntimeError
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?