Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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