Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step 1 Create a function called isValidSSN which accepts a string and It returns True if the string is in the appropriate format for a

image text in transcribed
Step 1 Create a function called isValidSSN which accepts a string and It returns True if the string is in the appropriate format for a U.S. phone number Examples: ans isValidSSN ("111-22-3333"); ans - isValidSSN ("111-22-33333") ans -isValidSSN ("111-44"); ans isValidSSN ("11a-222-3333") ans-isValidSSN ("12-456-7890"); etc. returns True or False. returns True returns False (too long) returns False (too short) returns False (no letters allowed) returns False (hyphen in wrong spot) MAKE SURE TO TEST ALL POSSIBILITIESI Step 2 Create a program that THOROUGHLY tests the isValidSSN function. Initialize resultsList to empty. Ask the user to enter a social security number and call the function. Store the ssn and the boolean result in a list of lists. Continue to allow them to enter social security numbers until they type DONE or Done or done. For part of the data shown above, resultsList would look like this: ["111-22-3333",Truel, ["111-22-3333", Falsel, ["111-44", Falsel, etc.] Step 3 Print a report, with headings and alignment as shown below. Social Security Number Valid Yes No No 501-11-2222 111-22-33333 111-44 etc

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

More Books

Students also viewed these Databases questions

Question

Have a brief review of human motivation theories

Answered: 1 week ago