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
vekshin1
2 years ago
10

In this exercise, you'll raise a manual exception when a condition is not met in a particular function. In particular, we'll be

converting birth year to age. Specifications One a new cell in your notebook, type the following function >>> import datetime >>> class InvalidAgeError(Exception): pass >>> def get_age(birthyear): age = datetime.datetime.now().year - birthyear return age Add a check that tests whether or not the person has a valid (0 or greater) If the age is invalid, raise an InvalidAgeError Expected Output >>> get_age(2099) Traceback (most recent call last): File "", line 1, in __main__.InvalidAgeError
Computers and Technology
1 answer:
Shtirlitz [24]2 years ago
8 0
Dhjejekewk that’s a lot
You might be interested in
When you save a presentation with a .potx file extension, which type of powerpoint file is created?
Elena L [17]
A file with the POTX file extension is a Microsoft PowerPoint Open XML Template file used to maintain the same layout, text, styles, and formatting across multiple PPTX files.
6 0
2 years ago
Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
nasty-shy [4]

Answer:

Answered below.

Explanation:

#Answer is written in Python programming language

#Get inputs

radius = float(input("Enter radius in inches: "))

height = float(input("Enter height in feet: "))

#Convert height in feet to height in inches

height_in_inches = height * 12

#calculate volume in cubic inches

volume = 3.14 * (radius**2) * height_to_inches

#convert volume in cubic inches to volume in gallons

volume_in_gallons = volume * 0.00433

#output result

print (volume_in_gallons)

7 0
3 years ago
The ListIterator interface
Katyanochek1 [597]

Answer:

b. adds to Iterator the ability to move backwards in the collection

Explanation:

In Java programming, the ListIterator interface adds to Iterator the ability to be bidirectional i.e move backwards and forward in the collection and it is a sub-interface of the Iterator interface.

The ListIterator interface makes it possible to modify any list during iteration and determine its position in the list.

4 0
3 years ago
Susan wants to play the games that come with Windows on her computer, but they are not on the Start menu. What should she do in
ollegr [7]

Answer:

Search for the games in the search bar

Explanation:

5 0
2 years ago
What term is used to refer to the requesting of information from a database?
nekit [7.7K]

The answer is: Querying

3 0
2 years ago
Read 2 more answers
Other questions:
  • You would like to search for information about storms but not tornadoes. What type of search strategy may be useful?
    10·2 answers
  • I Just Realized................
    7·2 answers
  • One key to success in a career is to be an accomplished
    15·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • When entering a expressway using a weave lane you must do what
    7·1 answer
  • What are the two basic classes of active directory objects?
    14·1 answer
  • If you want to transfer information transform STM to LTM, it is essential that you make the information ______________________.
    9·1 answer
  • NEED HELP
    9·1 answer
  • Fill this blanks with the given words​
    6·1 answer
  • What is used to accurately position objects on the slide using a single horizontal and vertical line that intersects in the cent
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!