Question: Problem Description: Write a Python program which reads a list of fu11 names - one per record. Each record ends with the new line -

Problem Description: Write a Python program which reads a list of fu11 names - one per record. Each record ends with the new line - including the last one. The program reads the file, converts the ifnes (fuli names) into a list of strings. A random number is generated for a first name and then the first name is parsed from the 1 ist of strings. A second random number is generated and a last name is parsed. The random first and random last are than concatenated and printed. For example, "Abraham Lincoln" could be randomly selected using "Abraham" as the first name. Then "George washington" could be randomly selected and "Washington" parsed for the last name. The first and last would be concatenated to yield the "strange name" of "Abraham Washington." Note on names: "Martin Van Buren" has first name of "Martin Van" and last name of "Buren" for the purpose of coding. "George H. W. Bush" has first name of "George H. W." and last name of "Bush." The next character after the last space in the full name is start of the last name. All characters up to that last space defines the first name. The list can be anything of your choosing. List of U.S. Presidents, your family and friends, or favorite entertainers or combinations thereof. Make sure you have at least 20 full names on your list. Have some with one or two middle initials or even a hyphenated name or multiple middle names. Sample Runs : tRun Lab06Extra.pY Rutherford B. Roosevelt \&Run Lab06Extra,py Donald J. Jackson HRun 'Lab06Extra.py Zachary Bush stRun Lab06ExtraV.py George Mokinley Required Submittals: Turn in to the Lab 6 Extra credit Dropbox a py file and txt file of your source code. Also include the txt file containing the names. File Edit View George Washington John Adams Thomas Jefferson James Madson James Monroe John Quincy Adams Andrew Jackson Martin Van Buren Wi111am Henry Harrison John Tyler James Polk Zachary Taylor Millard' Filimore Franklin Pierce James Buchanan Abraham Lincoln Andrew Johnson Ulysses S. Grant Rutherford B. Hayes James Garfield Chester Arthur Grover Cleveland Benjamin Harrison Grover Cleveland Wil1iam McKindey Theodore Roosevelt William H, Taft Woodrow Wilson Warren Harding Calvin Coolidge Herbert Hoover
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we need to develop a Python program that randomly generates a strange name by picking a first and last name from a list of full ... View full answer
Get step-by-step solutions from verified subject matter experts
