
Uni-5 Quiz
Authored by Uzma Sulthana
Computers
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if an exception occurs in a try block?
A) The program stops
B) The except block executes
C) The program skips to finally
D) Both B and C
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are strings in Python?
A) Mutable sequences of characters
B) Immutable sequences of characters
C) Lists of characters
D) None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the enumerate() function help with?
A) Traversing strings with indices
B) Counting string elements
C) Splitting strings
D) Formatting strings
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following code output?
A) RuntimeError
B) ZeroDivisionError
C) Cannot divide by zero!
D) None of the above
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the finally block do in this code?
A) Closes the file
B) Executes regardless of exceptions
C) Skips if except executes
D) None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
A) ell
B) hel
C) ello
D) None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output?
A) -1
B) 2
C) 3
D) None of the above
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?