1.1-Introductie-Programmeren

Calculating the Titanic survival rate

Difficulty: Filled Filled Filled

In this exercise you’ll create a program that does some basic analysis on the (official) Titanic survivor list. This time, we’ll keep it simple and investigate what the survival rates of the passengers are, based on the class of their accommodation (class one being fancy, class three being below decks). The dataset contains a passenger list and includes whether or not a person survived (in the form of an integer: 0 = no, 1 = yes),

Create a program that processes the Titanic survivor data and shows the outpat as given in the example.

Note: Although you can process the data as being a list, you don’t actually need to store any data in the form of a list! Think about the way you want to store your data.

Example

Example