Reference no: EM132356371
Topics : For loops, strings, lists
1. Write a program that fills two lists (or one nested list) with input from the user. One list should be students' first names and the second list should be students' last names (while loop).
2. Print the list of students first and last names using a for loop.
3. Check to find students of royalty. These will have princess or prince in the first or last name.
Report to the user how many there are of each. Also, keep track of the longest first and last name. Print each and how many characters. (you will need 1 or more for loops)
Sample run
Welcome to the student comparison program!
Enter student's first name: Princess
Enter student's last name: Pea
Would you like to enter another student (Y/N)? Y
Enter student's first name: Ellaminnow
Enter student's last name: Pea
Would you like to enter another student (Y/N)? Y
Enter student's first name: Prince
Enter student's last name: Egbert
Would you like to enter another student (Y/N)? Y
Enter student's first name: Super
Enter student's last name: Dog
Would you like to enter another student (Y/N)? N
Your students are: Princess Pea, Ellaminnow Pea, Prince Egbert, and Super Dog
There are 2 royalty in the class: 1 princess(es) and 1 prince(s)
The longest first name is Ellaminnow with 10 characters
The longest last name is Egbert with 6 characters