Question: To solve this problem, I ll walk through the steps and how the code can structured. Here s a Python implementation: - Create a dictionary

To solve this problem, Ill walk through the steps and how the code can structured. Heres a Python implementation:
- Create a dictionary of all the destinations and
-how many people suggested the destination
def record_destinations():
destination ={}
return destination
- Determine the favorite destination
-Display the favorite destination and how many people people choose it, or
-display a message informing the user if no destinations were entered.
def print_favorite_destination(destination_dictionary):
country =""
count =0
print(count, "people suggested", country)
-Main Program
-ToDo: call the appropriate functions
1. Use the starter code provided above.
2. Create the function record_destinations.
3. Ask for the name of a destination.
4. Use a variable called place_to_visit for the users suggested destination.
15. If the user presses enter, without entering a destination or if the destination is less than 5 characters, an error message should be displayed.
6. Populate a dictionary called destinations, with the suggested destinations and how many people suggested the destination.
7. Done will be entered when all destinations are supplied.
8. Done can be spelled in upper-, lower-, or mixed case.
9. Create the function print_favourite_destinations.
10. The most popular destination name must be printed using .title()..title() will ensure that all words start with a capital letter and all the other letters are lowercase.
>>> target= "China"
>>>print(destination.title())
China
11. When done was entered, either display
o The most popular destination, as well as the number of people suggesting it or
o a message that no survey was done.
OUTPUT:
Target: Bolivia
Target: bolivia
Target: Chile
Target: south korea
Target: Bolivia
Target: Germany
Target: Done
3 suggested Bolivia
---------------
Target: ----
Invalid input
Target: W
Invalid Input
Target: Indonesia
Target: Indonesia
Target: Done
2 suggested Indonesia
--------------------
Target: Done
No survey was made.
PLEASE NO AI OR CHATGPT, ADD COMMENTS ON THE CODES AS WELL FOR BETTER UNDERSTANDING

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!