Famous Shipwrecks Explorer – Python Challenge

With this challenge, we will embark on a virtual voyage across the seven seas to uncover the secrets hidden underwater. For centuries, shipwrecks have captivated the imagination of explorers and historians alike, each sunken vessel holding tales of bravery, tragedy, and discovery. From legendary ships like the Titanic to lesser-known but equally fascinating wrecks, these underwater treasures offer a glimpse into our maritime past.

The Thrill of Shipwreck Hunting

Shipwreck hunters are modern-day treasure seekers, armed with advanced technology and an insatiable curiosity. They scour the oceans, lakes, and seas, searching for the remnants of vessels lost to time. Each discovery is a testament to human ingenuity and resilience, a tangible link to our shared history.

Imagine the thrill of locating a long-lost ship, its hull encrusted with barnacles and coral, resting silently on the ocean floor. The stories these wrecks could tell – of storms weathered, battles fought, and voyages cut short. Now, with the power of Python, you can join the ranks of these intrepid explorers and unveil the mysteries of the deep from the comfort of your own computer.

Your Mission

In this challenge, you will create a Python program that allows users to select or input the name of a famous shipwreck. Your program will then dive into a CSV file containing data on renowned shipwrecks, performing a linear search to extract the relevant information. Once the data is retrieved, the program will display the exact location of the shipwreck on a world map, giving users a visual representation of these historic sites.

Learning Objectives

  • Reading data from a CSV file using Python
  • Performing a linear search through a list of data
  • Extracting and displaying specific information
  • Using external libraries to visualize data on a world map

CSV File

A CSV (comma-separated values) file is a plain text file that stores data in a table format. Each line of the file contain a record about a specific entity, in this case a famous shipwreck. On each line, each piece of data (field/column) is separated using a specific characters (e.g. a comma)

For this challeneg, we will be using a CSV file named famous_shipwrecks.csv containing information about several shipwrecks. The file has the following columns:

Ship Name, Year Sank,Longitude,Latitude,Depth (meters),Sea/Ocean,Year Discovered,Country of Origin,Type of Vessel

You will find the CSV file on a separate tab of the IDE provided below.

Python Challenge

Write a Python program that:

    Asks the user to enter the name of a shipwreck.
    Opens and reads the famous_shipwrecks.csv file.
    Performs a linear search through each line of the file to find the shipwreck.
    If found, displays the following information:

    • Name of the shipwreck
    • Latitude and Longitude
    • Depth (in meters)
    • Name of the Sea/Ocean where it was found
    • Year it sank
    • Year it was discovered

    Use the provided code snippet to display the shipwreck location on a world map.
    If the shipwreck is not found, display an appropriate message.

To complete this project you may want to read more about how to scan through and extract data from a CSV file using Python.

Python Code

We have started the code. You can see who this code is used to plot a specific location (longitude/latitude) on a world map.

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 5 / 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!

Tagged with: