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: 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:
You are given a list containing the location and the name of the wonders of the world.
The program will ask user for a particular location or name of a wonder, or to press enter to
receive a hint.
If the user requests a hint, a message is displayed providing only the location of the
wonders, and the program prompts the user again to enter the wonder name this time.
It will run through the list to search for the locationwonder name provided by the user.
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?
If the location is found it will display the wonder located at the given location.
Similarly, the user could have entered a wonder name, and if the wonder is found, its
location is displayed.
If the user input is not among the locationswonders the program should display the error message as: Wrong input, the program ends here
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.
Seven wonders name in the list, shown below is also provided in your template file.
sevenwonders China:Great wall", "Jordan:Petra", "Brazil:Christ the Redeemer", "Peru:
Machu Picchu", "Mexico:Chichen Itza", "India:TajMahal", "Italy:Colosseum"
Test the application by considering some possible IO Pseudocode:
Initialize the list of seven wonders
Initialize a variable named found and define it to be False at the beginning.
Initialize a variable named hint and define it to be zero at the beginning.
Prompt user to enter the locationwonder or press enter for a hint.
Check to see whether a hint is requested.
If so display the locations and prompt the user again for an input.
Reset hint to
Start for loop to iterate over the list items.
If location is present in the list, and the hint variable is
Print wonder and its Location
Reset flag variable to be True
If wonder is present in the list
Print wonder and its Location
Reset flag variable to be True
If flag variable is False
Print error message
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
