Question: Problem Statement: 7 Wonders of the World In this assignment, you will write a python application to identify wonders of the world and their location.

Problem Statement: 7 Wonders of the World
In this assignment, you will write a python application to identify wonders of the world and
their location. The purpose of this assignment is to gain experience in program planning using
pseudocode. You are given the pseudocode for the program and you will translate the code
into a python application.
Lab Scenario:
1. You are given a list containing the location and the name of the wonders of the world.
2. The program will ask user for a particular location or name of a wonder, or to press enter to
receive a hint.
3. If the user requests a hint, a message is displayed providing only the location of the 7
wonders, and the program prompts the user again to enter the wonder name this time.
4. It will run through the list to search for the location/wonder name provided by the user.
5. The list is defined as follows:
a. Each item of the list is a string.
b. Location and wonder are separated by a colon (:).
c. You need to separate the location and the name of the wonder by (:). Hint:
Remember how you split a string?
6. If the location is found it will display the wonder located at the given location.
7. Similarly, the user could have entered a wonder name, and if the wonder is found, its
location is displayed.
8. If the user input is not among the locations/wonders, the program should display the error message as: " Wrong input, the program ends here .
9. For this lab, you are expected to use for loop to iterate through each item in the list. The
program needs to be case sensitive. For example: user can enter the name in all lowercase
but the program will still find the name of the wonder if present in the list. Hint:
string.lower() and string.upper() are two methods that can be used.
10. Seven wonders name in the list, shown below is also provided in your template file.
seven_wonders =["China:Great wall", "Jordan:Petra", "Brazil:Christ the Redeemer", "Peru:
Machu Picchu", "Mexico:Chichen Itza", "India:TajMahal", "Italy:Colosseum" ]
11. Test the application by considering some possible I/O . Pseudocode:
1. Initialize the list of seven wonders
2. Initialize a variable named found and define it to be False at the beginning.
3. Initialize a variable named hint and define it to be zero at the beginning.
4. Prompt user to enter the location/wonder or press enter for a hint.
5. Check to see whether a hint is requested.
6. If so, display the 7 locations and prompt the user again for an input.
7. Reset hint to 1.
8. Start for loop to iterate over the list items.
9. If location is present in the list, and the hint variable is 0
10. Print wonder and its Location
11. Reset flag variable to be True
12. If wonder is present in the list
13. Print wonder and its Location
14. Reset flag variable to be True
15. If flag variable is False
16. Print error message

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!