1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nat2105 [25]
2 years ago
6

Consider the following code segment: try : inputFile = open("lyrics.txt", "r") line = inputFile.readline() print(line) _________

____________ print("Error") What should be placed in the blank so that the program will print Error instead of crashing if an exception occurs while opening or reading from the file?
Computers and Technology
1 answer:
aleksandrvk [35]2 years ago
6 0

Answer:

The answer is "except IOError:"

Explanation:

It is part of the exception handling, that stands for input/ output operation fails, this exception aeries when we attempting to access an anti-existent file, in the program so, it will give the program related errors.

  • This type of error is handled in the try block, it also allows you to prepare the deal with the exceptional block.  
  • It also helps you to hide the bugs by using code, if you handle an unexpected error.
You might be interested in
Why is weather forecast so important for hang gliders?
professor190 [17]
Well, it wouldn't be such a good idea if they got caught up in a storm, would it? :p

Strong winds could blow them off-course, or even lightning has a chance of striking the hand glider, causing damage to the glider, the person, or even both.

Additionally, a weather forecast can help in my generic situations. For example, knowing whether to wrap up warm for cold weather, or wear something a bit more loose and breathable for hot weather.
6 0
3 years ago
URGENT!!!
Alona [7]

False is your answer

5 0
3 years ago
Read 2 more answers
What is the difference between compliled and intebrated language?
Nady [450]

Answer:  

A compiled language is a programming language whose implementations are typically compilers and not interpreters. In this language, once the program is compiled it is expressed in the instructions of the target machine. There are at least two steps to get from source code to execution. While, an interpreted language is a programming language whose implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. While in this language, the instructions are not directly executed by the target machine. There is only one step to get from source code to execution.

I hope this helps.

3 0
2 years ago
Read 2 more answers
Answers please !!!!!!!!!!!!!!!!!!!!!!!!!!!
alina1380 [7]
Hard to see please add a better image. Actually just type out the question.
4 0
3 years ago
Q1. Information systems that monitor the elementary activities and transactions of the organizations are: I a. Management-level
VashaNatasha [74]

Answer:

B. Operational-level systems monitor the elementary activities and transactions of the organization.

6 0
2 years ago
Other questions:
  • Which of the following is not considered as part of technology literacy?
    8·1 answer
  • Recall that through either photographic or computer technology, researchers can make a composite (or "averaged") face out of any
    11·1 answer
  • PLEASE  HELPPPP!!!!!
    14·1 answer
  • Shelly tells a friend that her computer needs to be fixed because it has been producing a lot of heat and is smoking. Where is t
    10·1 answer
  • San Diego broker Cal Abrams has avoided the technological trend of the past 20 years. Finally, he's jumped online and realized w
    14·1 answer
  • ____ is a method of querying and reporting that takes data from standard relational databases, calculates and summarizes the dat
    11·1 answer
  • Your computer will organize files into
    6·2 answers
  • Ineeedd help please 35 points question
    5·1 answer
  • Complete each sentence
    10·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!