Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this part of the homework you will create a program that asks the user for their name, and then prints their initials. You must

For this part of the homework you will create a program that asks the user for their name, and then prints their initials. You must create a function calledgetInitials() that takes the name string and prints out the initials. It must be case insensitive and the initials must be printed in upper case.

The program must contain a main() and a function calledgetInitials(), implemented as described in the function header comment given below. (You should include this function header comment in your own code.)

########################################################### # getInitials() counts the instances of a letter in a string # Input: name; a string containing the name of the user # Output: None 

Here is some sample output, with the user input in blue. (Yours does not have to match this exactly, but it should be similar.)

linux[0]$ python hw5_part1.py Enter your name: Dr. Freeman A. Hrabowski, IIIYour initials are D.F.A.H.I.

linux[0]$ python hw5_part1.py Enter your name: supreme cat king Ben JohnsonYour initials are S.C.K.B.J.

linux[0]$ python hw5_part1.py Enter your name: Viceroy Charlie DogYour initials are V.C.D.

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

Identify three ways to manage an intergenerational workforce.

Answered: 1 week ago

Question

Prepare a Porters Five Forces analysis.

Answered: 1 week ago

Question

Analyze the impact of mergers and acquisitions on employees.

Answered: 1 week ago