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
sladkih [1.3K]
2 years ago
11

Write a program that uses a dictionary to store students birthdays. Your program should ask the user what their name is, and loo

k it up in the dictionary . If their birthday is known, it should tell them their birthday.
Computers and Technology
1 answer:
tekilochka [14]2 years ago
3 0

di = {"student":"10/30/1984", "student2":"11/16/2020"}

name = input("What is your name? ")

if name in di:

   print(di[name])

else:

   print("Your name is not in the dictionary.")

You can change the values inside the dictionary. I hope this helps!

You might be interested in
1. Add the following method to the Point class:
Pachacha [2.7K]

Answer:

Explanation:

The following code is written in Java and creates all of the methods that were requested in the question. There is no main method in any of these classes so they will have to be called from the main method and call one of the objects created method for the code to be tested. (I have tested it and it is working perfectly.)

class Point {

   private int x, y;

   public void Point(int x, int y) {

       this.x = x;

       this.y = y;

   }

   public double distance (Point other) {

      double distance = Math.sqrt(Math.pow((other.x - this.x), 2) + Math.pow((other.y - this.y), 2));

      return distance;

   }

   

   public int quadrant() {

       if (this.x > 0 && this.y > 0) {

           return 1;

       } else if (this.x < 0 && this.y > 0) {

           return 2;

       } else if (this.x < 0 && this.y < 0) {

           return 3;

       } else if (this.x > 0 && this.y < 0) {

           return 4;

       } else {

           return 0;

       }

   }

}

class Name {

   String firstName, lastName;

   char middleInitial;

   

   public String getNormalOrder() {

       String fullName = firstName + " " + middleInitial + " " + lastName;

       return fullName;

   }

   

   public String getReverseOrder() {

       String fullName = lastName + ", " + firstName + " " + middleInitial;

       return fullName;

   }

}

4 0
2 years ago
You can replace the parentheses on a function call with square brackets.
victus00 [196]

Answer:

ok is that a question or an answer because that does not make since

Explanation:

3 0
3 years ago
Look at the following assignment statements:
ziro4ka [17]

Answer: number 2 is the correct way to do it

Explanation:

3 0
2 years ago
The best answer it requests services, data and other resources available on the server​
Brilliant_brown [7]

Answer:

Explanation:

?

6 0
3 years ago
Read 2 more answers
Which example describes sharing risk?
irina1246 [14]

Answer:

where are the examples at I dont see them

3 0
3 years ago
Other questions:
  • How does making a phone call differ when using: A public phone A cell phone
    6·1 answer
  • What are the six critical components of an information system? Select three of the six components, and describe a potential vuln
    15·1 answer
  • The darker shadow of an eclipse is called the penumbra.<br><br> True<br><br> False
    12·1 answer
  • If a user wants to add an expansion card to increase the memory of a computer, where should the user insert the card?
    12·2 answers
  • How many people employed in the United States work in a job related to digital media?
    12·1 answer
  • Write python code that does the following: Ask the user to enter as many as number they want; Then find the sum and the average
    10·1 answer
  • Microsoft word is an example of utility software? <br><br>A.true <br>B.false​
    7·2 answers
  • A tool that helps teachers conduct online classes​
    8·1 answer
  • When text is used as a Hyperlink, it is usually underlined and appears as a different color.
    11·1 answer
  • You have implemented an access control method that only allows users who are managers to access specific data. Which type of acc
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!