Kickoff: meet the finalists

You have already seen some Python, so treat this activity as a quick refresher. Before a match begins, the announcer needs the names of the teams and captain. Your program stores those details in variables.

Reviewing variables now gives the next activities information they can reuse. In Activity 2, you will place these variables inside formatted match messages and add score variables. In Activity 3, an if/else decision will compare those scores to announce the winner.

As a reminder, a variable is a named place where a program remembers information. The value to the right of = is stored in the variable named on the left.

team_name = "Nuvi United"
opponent_name = "Comet City"
captain_name = "Maya"
jersey_color = "blue"

Text values are surrounded by quotation marks. Python calls a piece of text a string.

Starting code

Replace the contents of world_cup_2026.py with this working program:

team_name = "Nuvi United"
opponent_name = "Comet City"
captain_name = "Maya"
jersey_color = "blue"

print("Championship final")
print("Home team:", team_name)
print("Away team:", opponent_name)
print("Captain:", captain_name)
print("Jersey color:", jersey_color)

Run the file. You should see:

Championship final
Home team: Nuvi United
Away team: Comet City
Captain: Maya
Jersey color: blue

The print() function displays information. A function is a named instruction that performs a job.

Challenge: personalize your team

Change the four variables so the program introduces:

  1. a team name you invent;
  2. an opponent you invent;
  3. your chosen captain; and
  4. your team’s jersey color.

Run the program and check that all four new values appear. Keep these variables because the next activities build on them.

Change only the text between quotation marks. Keep each variable name and the = sign.