Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started