World Buildings Quiz!

For this challenge you are going to create a quiz based on some of the most iconic buildings in the world. We have selected a collection of 20 buildings with their name, height in meters and location. This data is stored in a CSV file called iconic-buildings.csv.

We have started the code for this quiz by using the random library in Python to randomly select one building (one line) from the csv file. We are then extracting the information on this line to display a “did you know?” statement about this building.

You can test our Python code below:

Quiz #1 – Where in the world?

You task is to create a set of quizzes using this data file.

Your first quiz should randomly pick a building, display its name and height and ask the user if they can guess the country this building is from. The quiz should have 10 questions and at the end it should give the user a total score out of 10. Finally once a quiz is completed, the program should ask the user if they want to play again.

Quiz #2 – Which building is taller?

Your second quiz will randomly select and display the name and location of two buildings from the csv file and ask the player to decide which building is taller. The quiz should repeat this process for as long as the player is guessing correctly. The quiz should automatically stop when the user gives an incorrect answer. In this case, a total score (total number of correct guesses) should be displayed on the screen.

To finalise this project, you should add a menu screen giving the option for the user to decide which quiz they would like to complete.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 4 / 5. Vote count: 3

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!