answer.
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]
2 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]2 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
If the computer has an encrypted drive, a ____ acquisition is done if the password or passphrase is available. a. passive b. sta
Aleonysh [2.5K]

Answer: C. Live

Explanation:

A live acquisition is where data is retrieved from a digital device directly via its normal interface such as activating a computer and initiating executables. Doing so has a certain level of risk because data is highly likely to be modified by the operating system. The process becomes significantly more common likely with less available disk space to the point of completely impractical to image.

7 0
2 years ago
Users need to be able to make use of _____ , such as rumors, unconfirmed reports, and stories, when solving problems.
jekas [21]

Answer:

Informal information

Explanation:

The informal information system is employee based system design to meet personnel and vocational needs and to help in the solution of work-related problems. it also funnels information upward through indirect channels.

However, one of the most important reasons for why informal communication is critical to businesses is that it allows employees to give feedback to their superiors.

Thus, the informal or grapevine communication promotes social relationship among the participants. It helps to build up unity, integrity and solidarity among them and boosts up their morale. Grapevine or informal communication is faster than the formal communication.

8 0
2 years ago
Write a full class definition for a class named Averager, and containing the following members:______An data member named sum of
alina1380 [7]

Answer:

  1. public class Averager {
  2.    private int sum;
  3.    private int count;
  4.    public Averager(int sum, int count) {
  5.        this.sum = 0;
  6.        this.count = 0;
  7.    }
  8.    public int getSum(){
  9.        return sum;
  10.    }
  11.    public void add( int num){
  12.        this.sum+=num;
  13.        this.count++;
  14.    }
  15.    public int getCount(){
  16.        return this.count;
  17.    }
  18.    public double getAverage(){
  19.        double ave = (int)this.sum/this.count;
  20.        return  ave;
  21.    }
  22. }

Explanation:

  • Lines 1-3 contains the class declaration and the member (data fields)
  • Lines 4-7 is the constructor that initializes the fields to 0
  • Lines 8-10 is the method that returns the value of sum getSum()
  • lines 11-14 iss the method add() that adds a number to the member field sum and increases count by 1
  • lines 15 - 17 is the method that returns total count getCount()
  • Lines 18-21 is the method getAverage() That computes the average and returns a double representing the average values

6 0
2 years ago
Read 2 more answers
Complete the function ConvertToDecadesAndYears to convert totalYears to decades and years. Return decades and years using the Ti
Sergeeva-Olga [200]

Answer:

It is a C++ program. The complete function   ConvertToDecadesAndYears which takes totalYears as parameter and convert totalYears to decades and years is provided in the attached document.

Explanation:

The explanation is provided in the attached document.

The screenshot of the complete code along with its output is attached.

6 0
2 years ago
Mitchell is assisting her teacher in a project by entering data into the spreadsheet. Which types of data can Michelle enter in
Rainbow [258]

Hello, Paper, types of data that Michelle can enter into a cell is,

• Data – values, usually numbers but can be letters or a combination of both.

• Labels – headings and descriptions to make the spreadsheet easier to understand.

• Formulas – calculations that update automatically if referenced data changes.

Hope this helped!

4 0
2 years ago
Read 2 more answers
Other questions:
  • "use the ______ element to create logical areas on a web page that are embedded within paragraphs or other block formatting elem
    15·1 answer
  • In the game Singularity, broken objects can be restored to their original condition by reversing time. This is an example of whi
    12·2 answers
  • In Python, what kind of error is returned by the following code? (e.g. NameError, ValueError, IOError, etc.) def my_func(n1, n2)
    8·1 answer
  • You are on vacation and want to see where all the restaurants and trendy shops are in relation to your hotel. You remember there
    15·1 answer
  • Suppose you are given an unknown chip which could be any one of the of the following: 7400, 7402, 7404, 7408, 7410, 7420, 7427,
    9·1 answer
  • Consider the following 3-PARTITION problem. Given integers a1; : : : ; an, we want to determine whether it is possible to partit
    10·1 answer
  • Write a class Student() such that it has an attribute 'score' (that is initialized with 10) and three methods: add_score(): adds
    12·1 answer
  • OH GOD PLEASE HELP I CAN'T FIGURE THIS OUT-
    6·1 answer
  • Explain the emerging trends in microcomputer technology in relation to size​
    11·1 answer
  • A client is currently struggling with late-stage integration and manual deployments. They want to find another method that will
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!