What Happens If The File Is Not Found In The Following Python #1177
What happens if the file is not found in the following Python code?</p> <pre><code class="language-python">a=False while not a: try: f_n = input("Enter file name") i_f = open(f_n, 'r') except: print("Input file not found")</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Exception Handling - Python Exception Handling - Quiz No.3.
What happens if the file is not found in the following Python code?
a=False while not a: try: f_n = input("Enter file name") i_f = open(f_n, 'r') except: print("Input file not found")
No error
Assertion error
Input output error
Name error