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
Anit [1.1K]
3 years ago
12

Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on yo

ur computer and catch the errors with try: except: blocks. Include the code and output for each example in your post. Describe how you might deal with each error if you were writing a large production program. These descriptions should be general ideas in English, not actual Python code.
Computers and Technology
1 answer:
vovangra [49]3 years ago
8 0

Answer:

Three python errors are; import error, value error, and key error.

Explanation:

Errors occur in all programming languages and just like every other language, python has error handling techniques like the try and except and also the raise keyword.

A value error occurs when an output of a variable or expression gives an unexpected value. Import error results from importing a module from an unknown source while a key error is from a wrong input keypress.

Catching these errors and raising an error gives more control and continuity of the source code.

You might be interested in
Provide the definition of an abstract class named DesktopComponent that contains the following:
Bess [88]

package mypackage; // Whatever package this should be in.

public abstract class DesktopComponent {

   

   private String type;

   // Alternatively you may want a final variable.

   // private final String type;

   

   public DesktopComponent(String type)

   {

       this.type = type;

   }

   

   abstract void onClick();

   

   

 

}

7 0
3 years ago
How can a scientist safely tell whether an unknown solution is salt in water or sugar in water?
kaheart [24]

Answer:

the answer is C

7 0
3 years ago
a _____ combines the characteristics of computer viruses, worms, and other malicious codes with vulnerabilities found on public
expeople1 [14]

Answer:

The answer is "Blended Threat"

Explanation:

In the given question some information is missing that is the option of the question, which can be described as follows:

a. Firewalls.

b. Mirror disc.  

c. Threat from the backdoor.

d. blended threat.  

It includes bugs malicious content like malware, grubs, and many other scripts. It helps in remembering things when you combine multiple tasks in a processor to help learn, Its combination of stuff is produced, and other choices were false that can be described as follows:

  • In option a, It provides security to malicious, that's why it is wrong.
  • In option b, It is part of storage system, that's why it is incorrect.
  • In option c, It bypasses the normal security system, that's why it is wrong
8 0
3 years ago
Consider the following code segment - 3
abruzzese [7]

Answer:

The answer is "Choice C".

Explanation:

In the above-given code, a 1D array "list" is declared that holds integer values, and it uses three print which can be defined as follows:

  • In a first print method, it uses the length method that holds the array length that is "9".
  • In a second print method, it uses the array that prints the first element value of the array that is "22".
  • In the last print method, it uses the array that holds the length of the array, which will give an error message that is "ArrayIndexOutOfBoundsException".  
  • That's why only the choice C is  correct.

8 0
3 years ago
Calories, sugars, and total fats could exceed the declared calorie value on the menu by only what percentage?
zysi [14]

Answer:

20

Explanation:

3 0
3 years ago
Other questions:
  • In​ today's global​ environment, everything and everyone are digitally connected to everything and everyone else. The term used
    6·1 answer
  • True or false words spelling and grammar check is always %100
    7·2 answers
  • What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
    15·1 answer
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • There are six different sequences for the three approval tasks: check inventory; check credit; check special terms.
    5·1 answer
  • In your opinion is it more beneficial to have many folders or is it better to nest subfolders
    12·1 answer
  • What is a special type of variable used in subroutines that refers to a piece of data?
    15·1 answer
  • Why doesnt brainly let me skip by watching video?
    7·1 answer
  • Match the context details with the pattern that applies.
    7·1 answer
  • What do you think that private information like passwords pin number will be guarded or shared with the public? why?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!