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
What is the definition of Graphic AIDS?.
V125BC [204]

Any image that helps you, the reader, understand the text that the visual aid is accompanied with is referred to as a visual graphic or graphic aid.

Too frequently, readers lazily scan or entirely ignore graphs, diagrams, charts, and tables. Grid graphs, tables, bar charts, flow charts, maps, pie diagrams, and drawings and sketches are the most popular. Relationships are displayed using grid graphs. A visual aid should always be used in conjunction with preparation to interest the audience, improve their comprehension of your message, elicit an emotional response, and assist you in communicating it effectively. Charts, diagrams, graphs, maps, flashcards, posters, images, photos, booklets, folders, pamphlets, cartoons, and comics are examples of graphic aids.

Learn more about graphic here-

brainly.com/question/1169945

#SPJ4

5 0
1 year ago
Without this step of the problem solving process you might solve the wrong problem, not know where to start, or not know when yo
STatiana [176]
Prepare should be the answer
7 0
3 years ago
A microphone is a type of electronic.<br><br> True/Faulse
GenaCL600 [577]
Yes, True, a microphone IS a type of electronic
4 0
2 years ago
The function below takes a single string parameter: sentence. Complete the function to return everything but the middle 10 chara
dolphi86 [110]

Answer:

def get_middle_ten(sentence):

   ind = (len(sentence) - 12) // 2

   return sentence[ind:ind + 12]

# Testing the function here. ignore/remove the code below if not required

print(get_middle_twelve("abcdefghijkl"))

print(get_middle_twelve("abcdefghijklmnopqr"))

print(get_middle_twelve("abcdefghijklmnopqrst"))

7 0
2 years ago
Can file extension txt be used in other os
rodikova [14]
Yes, a text file with a .txt extension can be read by Linux/Unix/Mac as they are ASCII unformatted.
6 0
3 years ago
Other questions:
  • __________ has led to the belief that the Internet is "free".
    8·1 answer
  • According to Newton's Second Law of Motion, when an object is acted on by an unbalanced force, how will that object respond?
    11·1 answer
  • A school at which you are likely to be accepted because you meet graduation requirements is called a:
    5·1 answer
  • What is the name of the virus that appears to be a legitimate program but when opened
    9·1 answer
  • Write a program to randomly fill an array of float of 10 elements (use the rand() function and make sure to use #include ) in ma
    11·1 answer
  • / Looks up author of selected books
    15·1 answer
  • Explain why it is important to follow a course or a program in keeping with your value system​
    13·1 answer
  • Fill in the blank
    15·2 answers
  • Universal containers set the organization-wide defaults for cases to private. When a case is escalated, case ownership changes t
    13·1 answer
  • What would be printed to the screen when the following program is run?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!