Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in pythin language display full name, (first middle, last) diapaly social security number dispaly person age File Under: Bad Decisions Prior to January 1998, a

in pythin language
image text in transcribed
image text in transcribed
image text in transcribed
display full name, (first middle, last)
diapaly social security number
dispaly person age
File Under: Bad Decisions Prior to January 1998, a Nevada driver license number was an encoding of the license holder's Social Security number (SSN) and year of birth. The encoding algorithm was simple and reversible: 1. Treat the holder's SSN as an integer (i.e.. no hyphens). 2. Multiply that integer by 2, then add 2,600,000,001 3. Append the two-digit birth year (assuming a birth year in the 1900s) to the end of the integer computed in step 2. The result is the holder's license number. For example, the lower image to the left shows the driver license of Mark Blackburn, who died in an accidental explosion near Las Vegas in 1997. Note that his license displays both his SSN and license number. We can demonstrate the calculation of his license number given his SSN of 556-98-0201 and birth year of 1955: 1. Ignore the dashes in the SSN to get 556,980,201. 2. 556,980,201 2 + 2,600,000,001 = 3,713,960,403. 3. The license number should then be 371396040355, as you can see on Mr. Blackburn's actual license. Assignment You shall write a Python program that reads four lines from standard input: 1. A person's first name 2. A person's middle name (o primer apellido, si es un nombre espaol) 3. A person's last name (o segundo apellido, si es un nombre espaol) 4. A person's pre-1998 Nevada driver license number The program shall then print three lines to standard output, namely: 1. The person's full name, formatted as follows. Ensure that the first letter of each name component is capitalized, and the remaining letters are lowercase, i.e.: Lastname, Firstname Mido 2. The person's full Social Security number, with standard hyphenation, i.e.: XXX-XX-XXXX 3. The person's age in years as an integer value), comparing their birth date to the current date, and assuming they were born on the first of January Sample Executable The command cs12p_nvdl demonstrates the expected behavior of your program given valid input. Feel free to test it (and your own program), e.g.: demostudent@jeff: $ cs12p_nvo Mark Wiley Blackburn 371396040355 Blackburn, Mark Wiley 556-98-0201 66 For quick testing (avoiding too much redundant typing!), consider using something like the following ANSI-C quoted here string as input to your program: demostudent@jeff:-$ cs12p_nvo Blackburn, Mark Wiley 556-98-0201 66

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

1. Explain key aspects of interpersonal relationships

Answered: 1 week ago