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
Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
pychu [463]

Answer:

Mohammed doesn't believe the cyberbullying exists.

Explanation:

If he knew he wouldn't say they are teasing him. I mean, how would their parents know he is being cyberbullied without evidence? Text messages(such as imessages) are most likely on phones, and not on computers.(Unless its an mac I believe.) And they are bullying him; its not using technology positively.

7 0
3 years ago
Read 2 more answers
A type of specialty processor devoted exclusively to protecting your privacy.
drek231 [11]
 Cryptoprocessor would be it.
8 0
3 years ago
Read 2 more answers
Which of the following statements is false? Question 4 options: By convention class names begin with an uppercase letter, and me
amm1812

Answer:

Instance variables can be declared anywhere inside a class.

Although there isn't any rule to declare instance variables before methods, and they can be declared anywhere in the class, they cannot be declared inside method definitions of class.

///////////////////////////////////////////////////////////////////////////////////////////////////////////

<em>By convention class names begin with an uppercase letter, and method and variable names begin with a lowercase letter.</em> - True.

<em>Instance variables exist before methods are called on an object, while the methods are executing and after the methods complete execution.</em> - True.

<em>A class normally contains one or more methods that manipulate the instance variables that belong to particular objects of the class.</em> - True

8 0
3 years ago
Read 2 more answers
Which is the best response to receiving a threating text from a classmate
Yuri [45]

Answer:

send a threatening text in reply, then block the phone number block the phone number, then contact his phone service provider immediately delete the text, then report the incident to authorities ignore the message, then get a new cell phone number.

Explanation:

5 0
2 years ago
Read 2 more answers
Insurance can help you:
AleksAgata [21]
The answer is: D for sure 
7 0
3 years ago
Other questions:
  • A storyboard is an example of an implementation tool.<br><br> A.<br> True<br><br> B.<br> False
    8·2 answers
  • Are the actions legal or illegal?
    13·1 answer
  • Rob Janoff believes that technology should not be used too
    11·1 answer
  • Biomimicry is the term used when engineers are inspired by objects found in nature? Group of answer choices True False
    10·1 answer
  • Who was the creator of the game Fnaf?
    11·2 answers
  • If I wished to insert a hyperlink from text in my document to my company website, what type of link would I insert?
    9·1 answer
  • Which property of a text element controls how the browser handles text that does not fit within the element box?
    13·1 answer
  • How to chnage email adresss on slate from tophat?
    13·1 answer
  • Now you are ready to implement a spell checker by using or quadratic. Given a document, your program should output all of the co
    15·1 answer
  • What are some applications of computer in public administration?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!