stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python for Cybersecurity: ch. 4a - Error Handling Flashcards | StudBud
Explore
/
Python for Cybersecurity: ch. 4a - Error Handling
Python for Cybersecurity: ch. 4a - Error Handling
8 terms
·
StudBud Administration
·
189 plays
Error Handling File Manipulation Module Definition and Usage Log Parsing
Flashcards
8 cards
F
Practice quiz
P
Host live
L
Questions
8
Answers
1
What does 'exception' do as an exception type?
gives the proper runtime error
stands as base class for all exceptions
allows you to pause code to troubleshoot
gives you the exact problem in your code
2
what handles the error in "try" code
except
exception
pass
break
3
Pick 2: Error handling:
allows scripts to continue functioning
produces crashes
stops program from running scripts
prevents crashes
4
True or False: "finally" runs whether code fails or succeeds
False
True
5
which item is not a common exception type?
ArithmeticError
TypeError
SystemExit
ModuloError
6
what does "raise" do for you in error handling?
prints a custom error message
inserts an error message in a variable
runs whether the code fails or succeeds
runs only if no exception occurs
7
MouseInterrupt is a common exception type
True
False
8
ArithmeticError occurs for:
numeric calculations
if statements
mismatched data type
imaginary number [ √-1 = sqrt of -1 ] calculations