Question 80 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question 80 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question

open_file = open(“text_file.txt”, “r’)

read file = open_file.read()
print (read_file)

Refer to the exhibit.

A developer created the code, but it fails to execute.

Which code snippet helps to identify the issue? A.

try:
open_file = open(“text_file.txt”, “r’)
read file = open_file.read()
print (read_file)

except:
print (“File not there”)

B.

try:
print (“File not there”)
except:
open_file = open(“text_file.txt”, “r’)
read file = open_file.read()
print (read_file)

C.

try:

open_file = open(“text_file.txt”, “r’)

read file = open_file.read()
print (read_file)
except:
print (“File not there”)
catch:
error (read_file)

D.

open_file = open(“text_file.txt”, “r”)
read_file = open_file.read()

try:
print (read_file)

except:
print (“File not there”)

Explanations

C.