Skip to main content

Countries Visited

Hey there!

In this section we'll be writing our second project. It'll be one where we ask the user for a country they have visited, and we will tell them whether we have visited it too.

For that, our program will have to have a list of countries it knows about, and it will have to be able to check whether the user's input is contained in that list.

Therefore we'll learn about:

  • Lists in Python; and
  • Comparisons and if statements.

These two chapters are a bit longer than chapters in the previous section, so I strongly encourage you to write code as I give it to you and also play around with it.

Changing code and trying things out is the best way to learn, so keep repl.it open and let's dive in!