1. Write a Python program named LastnameFirstname11.py, using your last name and your first name, that does the following:

  • Create a print_menu function that will print out the available commands that the user can enter in order to carry out one of the following tasks: add a phone number, find a phone number, delete an entry, print all phone numbers, or exit the program. (See Example Output)
    • For this function, create a list of strings that state the different commands and tasks:
      • "1 - Find the pirate's hidden treasure", "2 - Calculate the average temperature", etc.
    • Use a loop to print out the contents of the list when print_menu is called.
  • Create a function named function1 that will allow the user to do a task that uses a tuple. Return the tuple.
  • Create a function named function2 that will allow the user to do a task that uses a set. Return the set.
  • Create a function named function3 that will allow the user to do a task that uses a dictionary. Return the dictionary.
  • In the main function. Call the print_menu function once.
    • Ask the user to choose one of tasks listed. Call the appropriate function.
    • Use a loop to print the returned container.
    • Use a loop so the user can continuously add/find/delete/print until they decide to exit the program.
    • If the user chooses to exit, then end the program.
  • Do not create any other methods aside from the ones specified here.
  • All code in your program must be inside of a function definition, aside from calling main.
  • You may only call main once.

2. Be sure to add comments for each section of your code.

3. Your output must be descriptive. Make sure it's clear to the user what your program is doing.

4. Your program should not use code/concepts we have not yet covered. You must demonstrate that you have mastered the concepts covered in class.

Expected Output

>>>
=============== RESTART: ManuelNikki11.py ===============
*** Menu of Commands ***
1 : Learn where I've hidden some treasure
2 : Calculate the average temperature from this week
3 : Create a database of your friends + what their fave color is
4 : Exit

Enter a command: 1
ARRR~
You want to learn where I've hidden my vast hoard of treasure?!
Well, you seem like a nice person so I'll tell you!

You can find my treasure at the following coordinates:
(21.42358, -158.00546)
Happy hunting! :)

Enter a command: 100
That's not a valid command. Please try again!

Enter a command: -5
That's not a valid command. Please try again!

Enter a command: 3
Okay, let's store some info on your friends and their fave color.
You can use this in case you ever forget!

How many entries would you like the database to contain? 3
Sounds good, let's get started!

Enter friend's name: Anna
Enter Anna's fave color: seafoam green
Anna / seafoam green has been recorded

Enter friend's name: Bob
Enter Bob's fave color: fluorescent yellow
Bob / fluorescent yellow has been recorded

Enter friend's name: Charlie
Enter Charlie's favoe color: red
Charlie / red has been recorded

Here's the information you've stored:

Anna : seafoam green
Bob : fluorescent yellow
Charlie : red

Enter a command: 4

Thank you for using my program!
Now exiting...
>>>
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.