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
Templates contain common layout and formatting that can save you time by not having to recreate documents from scratch. True or
Anarel [89]
True because i had heard my friend doing her homework and i was helping her study
4 0
1 year ago
Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
marta [7]

Answer:

\left[\begin{array}{ccccc}1&1&1&0&1\\0&1&1&0&0\\1&0&0&1&0\\1&1&0&1&1\\1&1&0&0&0\end{array}\right]

Explanation:

To keep the checksum length minimum ,checksum field should be a 4x4 matrix with two dimensional even parity bit.

For this purpose first create a matrix of RxC dimensions and add one even parity bit at the end of each row and column.

parity bit is sort of a check flag used to detect errors in binary data.Error detection is done by adding total number of  1's in the binary sequence.

There are two types of parity bits

  1. Even
  2. Odd

For even parity if total number of 1 is even parity bit for that sequence would be (0).

For even parity if total number of 1 is odd parity bit for that sequence would be (1)

For odd parity if total number of 1 is odd parity bit for that sequence would be (0)

For odd parity if total number of 1 is even parity bit for that sequence would be (1)

4 0
2 years ago
Which best compares and contrasts visual and performing arts? Both careers use communication skills; however, people involved in
Vlad1618 [11]

Answer:

Both careers speak to an audience; however, people involved in the performing arts speak only to a live audience.

Explanation:

sorry im late but im not sure

3 0
2 years ago
Read 2 more answers
Assume that the reference variable r refers to a serializable object. Write code that serializes the object to the file ObjectDa
laiz [17]

Answer:

FileOutputStream out = new FileOutputStream("ObjectData.dat");

ObjectOutputStream ostream = new ObjectOutputStream(out);

ostream.writeObject(r);

Explanation:

For object serialization, we can use the writeObject method of java.io.ObjectOutputStream class.

The complete code fragment is as follows:

import java.io.*;

class Demo{

      public static void main(String args[]){

             try{

                  r = <Reference to Object to be serialized> ;

                 FileOutputStream out = new FileOutputStream("ObjectData.dat");

                 ObjectOutputStream ostream = new ObjectOutputStream(out);

                  ostream.writeObject(r);

                 ostream.close();

            } catch(Exception e){

                   e.printStackTrace();

            }

      }

}

5 0
1 year ago
Jason is working on a web page that includes Q&amp;A interactions. Which option should Jason select to engage users in the inter
Vaselesa [24]
E should be the correct answer
0 0
1 year ago
Read 2 more answers
Other questions:
  • In a spreadsheet, the instructions for carrying out calculations are called __________. recalculations formulas templates macros
    13·1 answer
  • The ________ program displays graphics and loading screens during the boot process.
    8·1 answer
  • When conducting research, protecting the privacy of patients requires careful attention to ensure ?
    11·2 answers
  • Fill in the blank; "As well as their traditional role of computing data, computers are also extensively used for..."
    14·1 answer
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • In the game of $Mindmaster$, secret codes are created by placing pegs of any of seven different colors into four slots. Colors m
    5·1 answer
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • What is Accenture's role in Multi-party Systems?
    12·1 answer
  • In this problem, you will derive the efficiency of a CSMA/CD-like multiple access protocol. In this protocol, time is slotted an
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!