Question: No Break COMMAND AND USE WHILE LOOPS hw5_part1.py (Worth 9 points) For this part of the homework you will create a program that asks the

No Break COMMAND AND USE WHILE LOOPS

hw5_part1.py (Worth 9 points)

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 # Parameters: name; a string containing the name # Return: 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

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!