Question: Write a program that continuously asks the user for home addresses, one at a time until the user types in q to stop.
Write a program that continuously asks the user for home addresses, one at
a time until the user types in to stop. The program should put the
addresses into a list and then process the list into a list of tuples containing
the street name and number. Display the list and the tuple list.
Input
First, the program should prompt the user for a home address, this prompt
then repeats until the user inputs
In other words, the program should expect the input to be a sequence of
lines containing home addresses, followed by a final line containing the
single character making up lines in total, where
In the tests the addresses will be restricted to a single word and an integer,
seperated by a space.
A word is defined as a series of English or Icelandic letters, each word is
composed of to letters, and each integer is composed of to digits with
no leading zeroes.
Output
The output should consist of two lines. The first line should contain a list of
all addresses input. The second line should contain a list of tuples where
each address has been split up into a tuple of word integer
Sample Input
Menntavegur
Dfnahlar
Bankastrti
Sample Output
Menntavegur Dfnahlar
MenntavegurDfr
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
