Mission 1 ยท Lesson 2

Variables: Storing Information

Names ยท Values ยท Memory

+35 XP on completion
โœ“ You completed this lesson โ€” 35 XP earned.
01

What a Variable Is

A variable is a labeled box that holds a value. In Python, one line can store text and another can store a number. Type both lines into your Python file and run it โ€” nothing prints yet, and that's correct.

name = "Elijah" age = 15
02

Use Your Variables

Now print them. Then try a sentence that uses both variables. Python assembles the pieces for you.

print(name) print(age) print("My name is", name, "and I am", age, "years old.")
03

Make It Yours

Create 3 variables: your favorite game, your favorite color, and one thing you want to build. Print a sentence using all three.

favorite_game = "Minecraft" favorite_color = "purple" thing_to_build = "a 3D game world" print("I like", favorite_game, favorite_color, "and I want to build", thing_to_build)

Complete all three steps first.

โฌก

35 XP Earned!

You just taught the computer to remember something.

Paste your 3-variable program here