answer.
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
Black_prince [1.1K]
1 year ago
13

Write an application that allows a user to enter the names and birthdates of up to 10 friends. Continue to prompt the user for n

ames and birthdates until the user enters the sentinel value ZZZ for a name or has entered 10 names, whichever comes first. When the user is finished entering names, produce a count of how many names were entered, and then display the names. In a loop, continuously ask the user to type one of the names and display the corresponding birthdate or "Sorry, no entry for name" if the name has not been previously entered. The loop continues until the user enters ZZZ for a name.
Computers and Technology
1 answer:
baherus [9]1 year ago
7 0

Answer:

<em>Written in Python</em>

names= []

birthday = []

name = input("Name: ")

bday = input("Birthday: ")

for i in range(1,11):

    names.append(name)

    birthday.append(bday)

    if name == "ZZZ":

         break;

    else:

         name = input("Name: ")

         bday = input("Birthday: ")

print("Length: ", end='')

print(len(names))

checknm = input("Check Name: ")

while checknm != "ZZZ":

    if checknm in names:

         ind = names.index(checknm)

         print(birthday[ind])

    else:

         print("Sorry, no entry for name")

    checknm = input("Check Name: ")

Explanation:

<em>The program is written in Python and I've added the full source code as an attachment where I used comments to explain difficult lines</em>

<em />

Download txt
You might be interested in
Marissa works at a company that makes perfume. She noticed many samples of the perfume were not passing inspection. She conducte
garik1379 [7]
Writing a business letter as if she gets her point across to the head of department then he could change the way they made the perfume so they would pass inspection and standard.
6 0
2 years ago
Read 2 more answers
There are 10 red apples and 12 green apples in a basket. If Vinta randomly selects 3 apples from the basket, what is the probabi
denpristay [2]

Answer:

12/22

Explanation:

As there are 22 apples in total and 12 green it is 12/22.

5 0
2 years ago
Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
Gnom [1K]

Answer:

Following are the code in the Java Programming Language:

try{  //try block.

processor.process();  // call the function through the object.

}

catch(Exception e){  //catch block .

System.out.println( "process failure");   //if any exception occurs then print.

}

Explanation:

In the following code, we set two blocks in Java Programming Language of the exception handling which is try block or catch block.

  • In try block we call the function "process()" through the "processor" object.
  • If any exception occurs in the program then the catch block print the following message is "process failure"
6 0
1 year ago
1. What might you say to someone whose reason for investing in 90% bonds and 10% stocks is that they want a 6% return on investm
Gemiola [76]

Investing in 90% bonds and 10% stocks will provide an average return of 6% on investment.It is advisable to invest more portion in bonds  is safe and will give higher return for investment than stocks

Explanation:

1. According to the graph investing in 90% bonds and 10% stocks will provide an average return of 6% on investment.

2.Investing in bonds is safe than stocks ., because bonds bear fixed rate of interest ., and investing in the bonds having very less risk than the stocks. By comparing stocks and bonds with the help of graph ., it's very clear bonds has a positive growth starting minimum at 32.6% to maximum at 64.2% as returns .But stocks has a negative growth (value) from -8.2% to maximum -43.1% .,It is advisable to invest more portions in bonds is safe and better than invest in stocks.

5 0
2 years ago
A contact list is a place where you can store a specific contact with other associated information such as a phone number, email
Arte-miy333 [17]

Answer:

# The user in prompted for input and stored in userInput

userInput = str(input("Enter the contact: "))

# The user input is splitted and stored in splitUserInput

# splitUserInput is a list because split returns a list

splitUserInput = userInput.split(" ")

# The user is prompt to enter the search contact

# The search contact will have the first letter capitalize

# should it be entered in lower case all through

searchContact = str(input("Enter the search contact: "))

# loop through the list

for i in range(len(splitUserInput)):

   # compare if the string at any value of i

   # is the same as the searchContact

   # we display the string ahead of it

   # by adding 1 to the index

   if(splitUserInput[i] == searchContact):

       print(splitUserInput[i + 1])

Explanation:

A sample screenshot is attached. The code is written in Python 3 and well commented.

The program prompt the user for input then split the input into a list. It then asked for a contact to search for. It begins looping through the list, if the search contact is found at any index, then it prints what is in front of the index.

5 0
1 year ago
Other questions:
  • Mechanical advantage is the ratio of the force required to move a load divided by______
    12·1 answer
  • Which type of utp cable is used to connect a pc to a switch port?
    10·1 answer
  • What are threats to computer system
    6·1 answer
  • there are four stage of the product life cycle. during which of these stages do you think is the best time for a company to purc
    10·2 answers
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
    6·1 answer
  • Write a statement that assigns total_coins with the sum of nickel_count and dime_count. Sample output for 100 nickels and 200 di
    11·1 answer
  • What data unit is encapsulated inside a packet?<br> frame<br> datagram<br> segment<br> session
    10·2 answers
  • A colleague sent you an awesome article about using proper ergonomics while sitting at the computer. You don't have time to read
    11·1 answer
  • The hostel in which you plan to spend the night tonight offers very interesting rates, as long as you do not arrive too late. Ho
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!