Question: please write this code in python and start with def business_card(contact_info): Part II: Create a Business Card (20 points) Write a function business.card ), which

 please write this code in python and start with def business_card(contact_info):

Part II: Create a Business Card (20 points) Write a function business.card

), which takes a single argument contact.info that contains the contact information

for a person. After validating the format of the argument, the function

creates a new string that reformats the input in a particular way

please write this code in python and start with

def business_card(contact_info):

Part II: Create a Business Card (20 points) Write a function business.card ), which takes a single argument contact.info that contains the contact information for a person. After validating the format of the argument, the function creates a new string that reformats the input in a particular way (described later) CSE 101 - Spring 2018 Lab #13 Page 5 A validly formatted contact.info string is defined by the following components, in the given order: 1. the string ' N' 2. exactly one space 3. a person's name, defined as a single uppercase letter, followed by any combination of uppercase letters, lowercase letters and spaces 4. exactly one space 5. the string ' *P' 6. exactly one space 7. exactly 10 digits 8. exactly one space 9. the string T' 10. exactly one space 11. a person's job title, defined as a single uppercase letter, followed by any combination of uppercase letters, lowercase letters and spaces If the contact-info argument is not validly formatted, the function returns the string 'error' . Otherwise, it returns a new string that contains the contact information reformatted as illustrated in the example below Suppose that the argument is the following validly formatted string: N Milana Howser Ross P 1006344742 T Systems Administrator' The return valid would be this: Part II: Create a Business Card (20 points) Write a function business.card ), which takes a single argument contact.info that contains the contact information for a person. After validating the format of the argument, the function creates a new string that reformats the input in a particular way (described later) CSE 101 - Spring 2018 Lab #13 Page 5 A validly formatted contact.info string is defined by the following components, in the given order: 1. the string ' N' 2. exactly one space 3. a person's name, defined as a single uppercase letter, followed by any combination of uppercase letters, lowercase letters and spaces 4. exactly one space 5. the string ' *P' 6. exactly one space 7. exactly 10 digits 8. exactly one space 9. the string T' 10. exactly one space 11. a person's job title, defined as a single uppercase letter, followed by any combination of uppercase letters, lowercase letters and spaces If the contact-info argument is not validly formatted, the function returns the string 'error' . Otherwise, it returns a new string that contains the contact information reformatted as illustrated in the example below Suppose that the argument is the following validly formatted string: N Milana Howser Ross P 1006344742 T Systems Administrator' The return valid would be this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!