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
3 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]3 years ago
8 0
Dhjejekewk that’s a lot
You might be interested in
Where would you go to access frequently used icons?
trapecia [35]

Answer:

b

Explanation:

4 0
3 years ago
Read 2 more answers
Which network type uses a coaxial cable to receive its signal?.
Tresset [83]
If you’re asking what I think your saying I know comcast does
6 0
2 years ago
Write a function named "json_filter" that takes a JSON formatted string as a parameter in the format of an array of objects wher
7nadin3 [17]

Answer:

Check the explanation

Explanation:

kindly check the well written code below to get the solution to your question.

import json

def json_filter(input_string):

   jsonFormat = json.loads(input_string)

   result = []

   for obj in jsonFormat:

       if obj["temperature"] > 38.46:

           result.append(obj)

   return json.dumps(result)

7 0
3 years ago
These are questions from my Computer/Customer Support Class
vladimir2022 [97]
Hey

1. Workers 

2. im not sure about this on

3. The

Hoped I Helped
5 0
3 years ago
Please help me with Question number 3. Please!!!
ohaa [14]

Answer:

you’re screen on my end is blank?

4 0
3 years ago
Other questions:
  • What will be displayed after the following statements execute? int funny = 7, serious = 15; funny = serious % 2; if (funny != 1)
    10·2 answers
  • Megara would like to create a web page using web design software, but she does not have any money to spend. What would you sugge
    15·1 answer
  • What is a left hand door lever?
    13·2 answers
  • Identify which statement explains why a programmer would break a logic problem into steps.
    13·2 answers
  • Develop a program that implements the POLYNOMIAL ADT using the LIST ADT. The POLYNOMIAL ADT is used to represent polynomials and
    8·1 answer
  • Create a winform application that lets the user enter a temperature. With a ComboBox object offer the user three choices for inp
    9·1 answer
  • By convention only, either the first usable address or the last usable address in a network is assigned to the router (gateway)
    11·1 answer
  • Suppose that you have been asked to create an information system for a manufacturing plant that produces nuts and bolts of many
    12·1 answer
  • SOMEONE PLEASE HELP!! i’ll give brainliest
    14·2 answers
  • The ability to present an effective message with useful content is obviously important to a good _____ presentation.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!