← All lessonsvariables-intro
Lesson·difficulty 1/5·~8 min

Variables: storing values

# Variables A **variable** is a name that points at a value. You make one with `=`: ```python age = 30 name = "Ada" is_admin = False ``` Python figures out the *type* (integer, string, boolean, …) from the value on the right. ## Your task Create three variables: - `name` — your display name as a string - `age` — an integer - `is_student` — a boolean (`True` or `False`) Then build a single string called `summary` that says: ``` "<name> is <age> years old (student: <is_student>)" ``` Example output for `name="Ada"`, `age=27`, `is_student=False`: ``` "Ada is 27 years old (student: False)" ``` You don't need to print anything — the test runner inspects `summary` directly.

Tests

  • summary is a string
  • summary mentions the name
  • summary mentions the age as a string
  • summary mentions the is_student value (hidden)
loading…
Loading editor…

Console output will appear here.

AI tutor
Sign in to chat with the tutor.