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
katen-ka-za [31]
3 years ago
10

Write a program named edit_data.py that asks a person their age. Accept an int. Use a custom exception to return a message if th

e number entered is an int that is less than 1 or greater than 115. Create an exception that catches an error if a non int is entered.
Computers and Technology
1 answer:
Katena32 [7]3 years ago
5 0
An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as instances that do not conform to a general rule. The name "exception" in computer science has this meaning as well: It implies that the problem (the exception) doesn't occur frequently, i.e. the exception is the "exception to the rule". Exception handling is a construct in some programming languages to handle or deal with errors automatically. Many programming languages like C++, Objective-C, PHP, Java, Ruby, Python, and many others have built-in support for exception handling.

Error handling is generally resolved by saving the state of execution at the moment the error occurred and interrupting the normal flow of the program to execute a special function or piece of code, which is known as the exception handler. Depending on the kind of error ("division by zero", "file open error" and so on) which had occurred, the error handler can "fix" the problem and the programm can be continued afterwards with the previously saved data.
You might be interested in
Given an char variable last that has been initialized to a lowercase letter, write a loop that displays all possible combination
Amanda [17]

Answer:

for (char outerChar='a'; outerChar<='e'; outerChar++){

for (char innerChar='a'; innerChar<='e'; innerChar++){

cout << outerChar << innerChar << "\n";

}

}

5 0
4 years ago
Who invented the first mechanical computer? in what year was it invented?.
Elodia [21]

Answer:

The first mechanical computer was invented by Charles Babbage in 1822.

6 0
2 years ago
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
topjm [15]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

8 0
4 years ago
Which type of device allows you to give the computer information and ask it to perform tasks?
Anon25 [30]
Your answer is A, input device.
6 0
4 years ago
Gui screen usually contain elements that are called?
KATRIN_1 [288]

Answer: Widgets

Components

Controls

Explanation:

4 0
2 years ago
Other questions:
  • Is the internet useful and why
    7·2 answers
  • Shaniya has misspelled a scientific name in her biology report. She needs to correct it, but she has no access to a computer. Sh
    13·2 answers
  • If a linux installation ends abnormally and the screen displays a fatal signal 11 error, what type of error has occurred?
    7·1 answer
  • Suppose a program is running on a distributed-memory multiprocessor. There are 1,000 instructions in the program and 80% of inst
    13·1 answer
  • Jennifer has her own business. Recently, she has ventured into creation of a new line of apparel. She has created a new symbol t
    14·2 answers
  • What is jcl language on the mainframe?
    10·1 answer
  • Need to know? Anyone feel like helping me not fail
    13·1 answer
  • Do all careers or professions need computer science? Why or why not?
    5·2 answers
  • Original documents or objects used during Internet research are known as
    8·2 answers
  • Ang Kabihasnang ito ay umusbong sa rehiyon ng Timog Mexico
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!