People Table
People Table
Read people as pairs of lines, a name with the prompt Name: and an age with the prompt Age: (kept as text), until a blank name is entered; store them in two lists with .append(). Then print a header with the words Name and Age and one row per person, every line using the format spec {name:<20} {age:>3} (name left-aligned in 20 columns, a space, age right-aligned in 3), and finally People: <n> using len(). The age for a row comes from the second list at the same position, so keep an index counter beside the for loop. Input: zero or more name/age pairs, then an empty line. Every prompt is part of the output, so all of them run together in front of the header line, as in Expected Output.
Expected Output:
Name: Age: Name: Age: Name: Name Age Maya 31 Ali 7 People: 2
= newline. The output ends with a newline — print one after the last line.
Your Output
Run your code to see the output here...