Cisco
350-901 · Question #13
open_file = open("text_file.txt", "r") read_file = open_file.read() print(read_file)
Sign in or unlock 350-901 to reveal the answer and full explanation for question #13. The question stem and answer options stay visible for context.
Software Development and Design
Question
open_file = open("text_file.txt", "r")
read_file = open_file.read()
print(read_file)
Options
- Atry: open_file = open("text_file.txt", "r") read_file = open_file.read() print(read_file) except: print("file not there")
- Btry: print("file not there") except: open_file = open("text_file.txt", "r") read_file = open_file.read() print(read_file)
- Ctry: open_file = open("text_file.txt", "r") read_file = open_file.read() print(read_file) except: print("file not there") catch: error(read_file)
- Dopen_file = open("text_file.txt", "r") read_file = open_file.read() try: print(read_file) except: print("file not there")
Unlock 350-901 to see the answer
You've previewed enough free 350-901 questions. Unlock 350-901 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Python#Error Handling#File I/O#Exception Handling