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
What variation of a dictionary attack involves a dictionary attack combined with a brute force attack, and will slightly alter d
Galina-37 [17]

Answer:

D) Hybrid Attack

Explanation:

This type of  attack is a blend of both a dictionary and brute force attack. The meaning of this is, while a dictionary attack method would capture a wordlist of passwords, the brute-force attack would be applied to each of  password captured.

6 0
3 years ago
Which technology concept uses computer resources from multiple locations to solve a common problem?
MrRa [10]
Sounds like you are talking about Grid computing. You can also say cloud computing since that is the buzz words nowadays, but cloud computing is a very general statement.
5 0
3 years ago
Read 2 more answers
Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
astraxan [27]

Answer:

uuuuu

Explanation:

8 0
2 years ago
Read 2 more answers
Write a function called play_round that simulates two people drawing cards and comparing their values. High card wins. In the ca
elena-s [515]

Answer:

Here you go, Change it however you'd like :)

Explanation:

import random as r

def play_round(p1, p2):

   cards = [1,2,3,4,5,6,7,8,9,10,"J","Q","K","A"]

   play1 = r.choice(cards)

   play2 = r.choice(cards)

   

   while play1 == play2:

       play1 = r.choice(cards)

       play2 = r.choice(cards)

   

   if cards.index(play1) > cards.index(play2):

       return f"{p1}'s Card: {play1}\n{p2}'s Card: {play2}\nThe Winner is {p1}"

   else:

       return f"{p1}'s Card: {play1}\n{p2}'s Card: {play2}\nThe Winner is {p2}"

print(play_round("Bob","Joe"))

8 0
3 years ago
_____ rows indicate that there is different formatting for odd and even rows.
Sladkaya [172]
Banded rows indicate that there are different formatting for odd and even rows.
5 0
3 years ago
Other questions:
  • What is data. Explain it in brief
    11·2 answers
  • In the software development life cycle, what is the role of participants in the planning phase? The participants’ role in the pl
    6·1 answer
  • Why are advanced features helpful when businesses use spreadsheets
    5·1 answer
  • Create a calendar named fitness and then display it in a calendar view with the default calendar.
    15·1 answer
  • A company purchased a high-quality color laser printer to print color brochures and sales proposals. The printer is connected to
    5·1 answer
  • MULTIPLE CHOICE:
    15·1 answer
  • Irene wants to connect your smart phone wirelessly to her laptop in order to transfer images. which two images could she reasona
    15·1 answer
  • 1. What are you going to do if someone ask for your personal information online?​
    12·2 answers
  • Which open-sourced packet capture tool uses linux and mac os x operating systems?
    10·1 answer
  • A company is looking for an employee to help organize customer information for the sales team. Which computer field includes thi
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!