Question: In Python, write a function names() that takes no parameters and repeatedly asks the user to enter the first name of a student in a
In Python, write a function names() that takes no parameters and repeatedly asks the user to enter the first name of a student in a class. Names that differ only by capitalization should be considered the same. When the user enters the empty string, the function prints the number of times every name entered by the user appears. If there is just one student with a given name, the message printed for that name should start 'There is", but if there is more than one student with that name, the message printed should start "There are". All names should be displayed with the first letter capitalized and the rest of the letters in lowercase. The following shows a sample run of the function: 
Python 3.4.1 Shell File Edit Shell Debug Options Windows Help names Enter the next name Alex Enter the next name: Djengo Enter the next name: DJENGO Enter the next name CINDY Enter the next name: There is 1 student named Cindy There is 1 student named Alex. There are students named Djengo. names Enter the next name: names Enter the next name Chris Enter the next name: CHRIS Enter the next name Susan Enter the next name SUSAN Enter the next name: Susan Enter the next name: Amber Enter the next name: There are 2 students named Chris. There are 3 students named Susan. There is 1 student named Amber
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
