Write a Python program that keeps reading in names and ages from the user, until the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python program that keeps reading in names and ages from the user, until the user enters 0. Once the user enters 0, you should print out all the information that was entered by the user. Use this case to test your program: • Input: John 61 Marcel 17 Daisy 25 Samantha 52 Nelson 71 Deborah 46 0 Output: John 61 Marcel 17 Daisy 25 Samantha 52 Nelson 71 Deborah 46 Use two arrays to hold the names and the ages. Once the user enters 0, stop reading in data, and start printing out all the data in the two arrays in the same order that they were entered. Write a Python program that keeps reading in names and ages from the user, until the user enters 0. Once the user enters 0, you should print out all the information that was entered by the user. Use this case to test your program: • Input: John 61 Marcel 17 Daisy 25 Samantha 52 Nelson 71 Deborah 46 0 Output: John 61 Marcel 17 Daisy 25 Samantha 52 Nelson 71 Deborah 46 Use two arrays to hold the names and the ages. Once the user enters 0, stop reading in data, and start printing out all the data in the two arrays in the same order that they were entered.
Expert Answer:
Answer rating: 100% (QA)
Here is the Python program that reads names and ages from the user until the ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Write Python code for creating an empty array, then use a loop to generate 5 random values and insert them into the array, and finally use another loop to read the values in the array and print them...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Write a program that takes the name of a .wav file and a playback rate r as command-line arguments and plays the file at the given rate. First, use StdAudio.read() to read the file into an array a[]....
-
Studies indicate that good leaders are typically positive and enthusiastic. In what ways do the tips cited in the vignette suggest the possession of these qualities by the various leaders who offer...
-
1. Suppose the manager of Outdoor World places this advertisement in the newspaper: Extreme Tents 50% offThis week only. Willen, in the market for a tent, sees the advertisement and arrives at...
-
Acne Medication and Gastrointestinal Injury Since 1999, Kamie Kendall had experienced ongoing abdominal pain, and she was eventually diagnosed with ulcerative colitis and irritable bowel syndrome...
-
Segmented Reporting Cineplex Corporation is a diversified company that operates in five different industries: A, B, C, D, and E. The following information relating to each segment is available for...
-
data in Range N 6 : Y 4 3 describes NFL quarterback ( QB ) statistics for the 2 0 1 3 season. Write different formulas for the following questions. Name Team G QBRat Comp Att Pct Yds Y / G Y / A TD...
-
Use mesh analysis to find ix in Fig. 13.80, Where is = 4 cos(600t) A and vs = 110 cos(600t + 30º) 12 F 150 800 mH 600 mH
-
Requirement Based on the amounts of taxable income below, compute the federal income tax payable in 2014 on each amount assuming the taxpayer is married filing a joint return. Also, for each amount...
-
Why did the relaxation of mortgage lending standards lead to an increase in house prices in the U.S. during the 20002006 period?
-
What are the changes that have taken place in the regulation of the OTC market since the 2008 financial crisis?
-
Which is better for a lender: 5% compounded annually or 5% compounded quarterly?
-
A company can borrow for five years at 4%. Five-year interest rate swaps are quoted as bid 3.21%, ask 3.25%. What floating borrowing rate can be obtained using a swap?
-
How much does someone with a short contract gain or lose when the three-month Eurodollar futures price changes from 97.540 to 98.080?
-
Answer the following questions. 1. Should teachers be required to meet higher or different standards of personal morality than other citizens? Why or why not? 2. In your experience, which types of...
-
Representative data read from a plot that appeared in the paper Effect of Cattle Treading on Erosion from Hill Pasture: Modeling Concepts and Analysis of Rainfall Simulator Data (Australian Journal...
-
Explain why it is more difficult to compare floating-point numbers than integers. Write Java code to test whether an integer n equals 10 and whether a floating-point number x is approximately equal...
-
In Exercise P9.16, add a method default Filter invert() to the Filter interface that yields a filter accepting exactly the objects that this filter rejects. Data from Exercise P9.16, Declare an...
-
It is common for people to name directories as dir 1 , dir 2 , and so on. When there are ten or more directories, the operating system displays them in dictionary order, as dir 1 , dir 10 , dir 11 ,...
-
For the three-room house shown in Figure 7.35, all rooms are perfect squares and have the same dimensions. An air conditioner produces an equal amount of heat flow \(q_{\mathrm{ho}}\) out of each...
-
Figure 7.18 shows a liquid-level system in which two tanks have cross-sectional areas \(A_{1}\) and \(A_{2}\), respectively. The volume flow rate into tank 1 is \(q_{\mathrm{i}}\). A pump is...
-
Consider the single-tank liquid-level system shown in Figure 7.19, where the volume flow rate into the tank through a pipe is \(q_{\mathrm{i}}\). The liquid leaves the tank through an orifice of area...
Study smarter with the SolutionInn App