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
Which of the following is NOT a characteristic developed by New Journalism?
krok68 [10]
Flashy page layouts
7 0
3 years ago
Investigate the many ways that hardware and software can cause an interrupt to occur. Are ALL interrupts treated equally or do s
slavikrds [6]

Answer:

Following are the responses to the given question:  

Explanation:

This list is based mostly on the processor. Then you'll be ordered. An interrupt of a particular cable (wire) is produced for PC-ish CPUs (IRQ 0 - 31 for some intel processors). The bigger challenge is a lower number.

Strange factors have included a system clock, power business, 0, some reserved for use by CPU testing, serial/parallel/... ports and also some terminated/error/state/new devices requests device Thus a key touch on the keyboards could create an interrupt that was direct on old devices.

3 0
2 years ago
In the 2018-2019 softball season, Allison hit the ball 28 out of 67 times, this included fouls. What was her percentage
ruslelena [56]

Answer:

Allison missed 58.21% of the times.

Explanation:

The first step is to divide 28 by 67 to get the answer in decimal form:

28 / 67 = 0.4179

Then, we multiplied the answer from the first step by one hundred to get the answer as a percentage:

0.4179 * 100 = 41.79%

Then 100(%) - 41.79(%) = 58.21%

5 0
2 years ago
Ebba has received a new initiative for her security team to perform an in-house penetration test. What is the first step that eb
myrzilka [38]

The first step that Ebba should take is: Information gathering and Reconnaissance.

<h3>What is an In-house Penetration Test?</h3>

An in-house Penetration test is a form of offensive test that is aimed at finding the lapses that a system has and initiating attacks to know the best way to prevent them.

Before launching such a test it is advised to plan and gather information about the possible lapses.

This will help the pen tester to know what attacks to launch and the right measures to resolve them. So, the first step that Ebba should take is Information gathering and Reconnaissance.

Learn more about In-house Penetration test here:

brainly.com/question/19085749

3 0
1 year ago
What will be the code in CSS, to set
LUCKY_DIMON [66]

Answer:

font-family: Tahoma;

font-size: 7px;

text-decoration: underline;

Explanation:

As for the font-family, you can also specify the general font family to which the Tahoma font belongs.

4 0
3 years ago
Other questions:
  • Alexandria works for a non-for-profit company that asks for donations to help the homeless people in her community. Recently the
    8·1 answer
  • Unlike artistic drawings, which communicate self-expression and
    15·1 answer
  • What is one way to maintain Internet safety? a) avoid interacting with people on the Internet. B) avoid giving out information a
    7·1 answer
  • A 1024-bit message is sent that contains 992 data bits and 32 CRC bits. CRC is computed using the IEEE 802 standardized, 32-degr
    8·1 answer
  • The ____ command displays the last 10 lines of a text file.
    5·1 answer
  • If you're under 18 and you receive _____ or more license points in 12 months, you'll be restricted to driving only to school or
    11·1 answer
  • which feature of organisations to manage needs to know about to build and use information system successfully
    6·1 answer
  • Can somebody help me with this please
    6·2 answers
  • What is another term for additive manufacturing
    7·1 answer
  • What is the key difference between a class and an object
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!