Exam 9: Files and Exceptions
Exam 1: Introduction to Computers and Python 28 Questions
Exam 2: Introduction to Python Programming 32 Questions
Exam 3: Control Statements and Program Development 20 Questions
Exam 4: Functions 18 Questions
Exam 5: Sequences: Lists and Tuples 25 Questions
Exam 6: Dictionaries and Sets 27 Questions
Exam 7: Array-Oriented Programming With Num 18 Questions
Exam 8: Strings: a Deeper Look 20 Questions
Exam 9: Files and Exceptions 30 Questions
Exam 10: Object-Oriented Programming 42 Questions
Exam 11: Computer Science Thinking: Recursion, Searching, Sorting and Big O18 Questions
Exam 12: Natural Language Processing 22 Questions
Exam 13: Data Mining Twitter 15 Questions
Exam 14: Ibm Watson and Cognitive Computing 31 Questions
Exam 15: Machine Learning: Classification, Regression and Clustering 66 Questions
Exam 16: Deep Learning 76 Questions
Exam 17: Big Data: Hadoop, Spark, Nosql and Iot 79 Questions
Select questions type
Which of the following statements a), b) or c) is false?
Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
C
Which of the following statements a), b) or c) is false?
Free
(Multiple Choice)
4.9/5
(36)
Correct Answer:
A
Which of the following statements a), b) or c) is false?
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
D
When a Python program begins execution, it creates three xe "file object:standard"xe "standard file objects"standard file objects: sys.stdin-the standard input file object,
sys.stdout-the standard output file object, and
sys.stderr-the standard error file object.
You must import the sys module if you need to refer to these objects explicitly in your code, but this is rare. Which of the following statements is false?
(Multiple Choice)
4.7/5
(31)
b. When there are except handlers, program control transfers to the first one that matches the type of the raised exception. If there are no except handlers that match the raised exception, a process called xe "stack:unwinding"stack unwinding occurs.
c. When an except clause successfully handles an exception, program execution resumes with the finally clause (if there is one), then with the next statement after the try statement.
d. After an exception is handled, program control returns to the xe "raise point"raise point.
Answer: d. Actually, after an exception is handled, program control does not return to the xe "raise point"raise point-rather, control resumes after the try statement.
9.8.3 xe "multiple-exception catching[multiple exception catching]"xe "except clause:catching multiple exceptions"xe "catching multiple exceptions in one except clause"Catching Multiple Exceptions in One except Clause
-Which of the following statements is false?
(Multiple Choice)
4.8/5
(41)
The json module enables you to convert objects to xe "JSON (JavaScript Object Notation)"JSON (JavaScript Object Notation) text format. This is known as ________ the data.
(Multiple Choice)
4.8/5
(33)
If the contents of a file should not be modified, open the file for ________-another example of the xe "principle of least privilege"principle of least privilege. This prevents the program from accidentally modifying the file.
(Multiple Choice)
4.8/5
(29)
The json module's ________ function reads the entire JSON contents of its file object argument and converts the JSON into a Python object. This is known as ________ the data.
(Multiple Choice)
4.9/5
(32)
Showing 1 - 20 of 30
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)