Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Social Security Number Validation ( 1 0 points ) : You will be writing a program that takes in a list of social security numbers
Social Security Number Validation points: You will be writing a program that takes
in a list of social security numbers from the user and after the list has been completely
entered, it validates the answers. Please submit your final Python program and PDF
copy of it via the DL Dropbox for Assignment
For this program, we will be utilizing many concepts such as lists, Boolean values,
iteration, user input, and formatting in an effort to review early python concepts. A sample
run of the program is shown below, but this program should:
Ask the user to enter social security numbers one at a time until they type some variation
of 'done' ie 'done', 'DONE', 'dOnE', 'doNE', etc... use a string method for this!
The lower and upper methods should work nicely
For every candidate social security number SSN entered by the user, the program
should use a function called isvalidSSN to check the validity of the entered SSN
This isvalidSSN function should check the SSN is the valid length, has the
hyphens in the right places, and that all the values other than hyphens are digits. Once these
checks are done, isvalidSSN should return a element list consisting of the candidate
SSN and a Boolean value describing its validity ega False
The program should use the results of calling isvalidSSN for each candidate
social security number to build a list of lists of all the candidate SSNs and their validity
eg Truea False This list of
lists should be printed into a nicely formatted table using fstrings or the format method.
This string formatting should be done in main Formatting Strings Help: See
Section of your textbook for a refresher on format method and Section for
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started