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]
4 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]4 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
11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
Nonamiya [84]

Your correct answer is A. Always drive at the posted speed limit.

While B. and C. are logically also correct, I wouldn't call them the "golden" rules. Following A. can help you avoid B. to make matters better, hehe.

3 0
3 years ago
There is an increasing need for private security personnel because of declining resources for many government agencies and a sho
aivan3 [116]
<span>True
</span><span>There is an increasing need for private security personnel because of declining resources for many government agencies and a shortage of police officers in many communities due to lack of funding.

</span>
8 0
4 years ago
PYTHON Write a grade program using a function called computegrade that takes a score as its parameter and return a grade as a st
makvit [3.9K]

def computeGrade(float grade, str a){

a = "A" if a > 0.9 else a = "B" if a > 0.8 else "C"

return a;

}

print(a)

3 0
4 years ago
Following program use in coding
storchak [24]

Hmmmmmm..... I think its java if I'm correct

7 0
3 years ago
8. It is used to get qualitative data.​
frez [133]

Answer:

please give me brainlist and follow

Explanation:

Qualitative data describes qualities or characteristics. It is collected using questionnaires, interviews, or observation, and frequently appears in narrative form. For example, it could be notes taken during a focus group on the quality of the food at Cafe Mac, or responses from an open-ended questionnaire.

7 0
3 years ago
Other questions:
  • If I were to install python in kali linux on a Acer 11 Chromebook and C730 would I be able to hack python with it since I have n
    15·1 answer
  • To copy consecutive items, click the first item in the group, hold down _______, and click the last item
    7·2 answers
  • Which of the following is the process of transferring data in a continuous and even flow, which allows users to access and use a
    12·1 answer
  • .doc What is the difference between a skilled hacker and an unskilled hacker, other than skill levels? How does the protection a
    5·1 answer
  • ? I don’t understand
    8·2 answers
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    6·1 answer
  • How can a search be narrowed to only search a particular website????
    15·1 answer
  • Which of the following correctly stores 45 squared in the variable x?
    11·1 answer
  • Do you need a separate password for each slack channel
    13·1 answer
  • 5.23 LAB: Contains the character
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!