Question: Write a function monogram () that takes three strings representing first, middle, and last names (in that order) and returns a string representing the monogram

Write a function monogram() that takes three strings representing first, middle, and last names (in that order) and returns a string representing the monogram for that name. A monogram is formed by taking the letters that begin each of the first, middle, and last names, making them uppercase, and arranging them so that the first letter of the first name is followed by the first letter of the last name which is followed by the first letter of the middle name. The capitalization of the original name should not be taken into account, so that a name in uppercase, lowercase, or mixed case would produce the same monogram. The following shows how monogram() would be used on several sample parameters:

>>> monogram('john', 'adam', 'procter')

'JAP'

>>> monogram('isLa', 'sKYE', 'JONES')

'ISJ'

>>> monogram('sweet', 'cookie', 'dog')

'SCD'

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!