Python · Level 1 Basics

Print & Variables

Write your first lines of Python: show text on the screen with print() and store values in variables.

  • print() shows a value on the screen
  • Text (str) goes inside quotes
  • Whole numbers (int) have no quotes
  • name = value stores a value

print() displays whatever you put between the parentheses.
A variable is a name that stores a value — create one with =.
Text needs quotes, numbers don't.

print("Hi there!")      # shows: Hi there!

city  = "Paris"         # text  (str)
years = 3               # number (int)

print(city)             # shows: Paris
print(years + 1)        # shows: 4

Replace every ___ in the editor:

  1. Set name to your name as text (in quotes).
  2. Set age to a whole number.
  3. Print exactly Hello, Python!
solution.py
Test Suites Pending
Stdout