Loop exercise #2

1. Create a program to ask for the names of all your friends, and print the name of each friend. When you type END instead of a friend's name, it stops and prints the number of friends you have. (See sample run below.)

2. Create a new program to ask for the names of your 3 best friends, and prints the name of each friend. (See sample run below.)

3. Now create a program that asks for the name of a person who has friends, and then the names of that person's 3 best friends. It prints the name of the person who has friends, followed by their 3 best friends. It keeps asking for another person who has friends (and their 3 best friends) until the user enters END. You only need to turn in program #3. (See sample run below.)

=====

Sample run for #1:

I will keep asking you for friends until you enter END.
Give me the name of a friend of yours or stop by entering END. KRIS
So Kris is your friend.
Give me the name of a friend of yours or stop by entering END. AMY
So Amy is your friend.
Give me the name of a friend of yours or stop by entering END. END
You have 2 friends

Sample run for #2:

I will ask you for 3 friends.
Give me the name of 1 friend of yours. KRIS
So Kris is your friend.
Give me the name of 2 friend of yours. AMY
So Amy is your friend.
Give me the name of 3 friend of yours. MARY
So Mary is your friend.
(Note: It knows to end after 3.

Sample run for #3:

I will ask for the name of a friend, and then 3 of their friends. I will keep going until you enter END.
Give me the name of a friend of yours or stop by entering END. KRIS
Give me the name of 1 friend of Kris's: JO
Give me the name of 2 friend of Kris's: MARY
Give me the name of 3 friend of Kris's: GARY
Kris is friends with Jo, Mary and Gary
Give me the name of a friend of yours or stop by entering END. JAMIE
Give me the name of 1 friend of Jamie's: KRIS
Give me the name of 2 friend of Jamie's: MARY
Give me the name of 3 friend of Jamie's: JULIE
Jamie is friends with Kris, Mary and Julie
Give me the name of a friend of yours or stop by entering END. END
You have 2 friends.