What is Python?

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

What is Python?

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Python is a text-based programming language.
A False
B True
2. Which word describes a set of instructions that tells a computer what to do?
A Program
B Console
3. In what order does Python run the instructions in a program?
A Top to bottom
B Bottom to top
4. Where does the output of a Python program appear?
A The code area
B The console
5. Who writes a Python program?
A A human
B The computer

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1program A# You type this # Python runs this
2console BThe panel where the output of a running program is displayed
3Python executes code top to bottom CA set of instructions written by a human that tells a computer what to do
4Humans write programs; computers run them DWrong — Python always executes from top to bottom, line by line
5# Python runs bottom to top E# line 1 runs first # line 2 runs second
6# The console is where you write code FWrong — you write code in the code area; the console shows output

Definitions

program

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
# This is a ______ program
2.
# Each line is one ___________
3.
# Python runs line by ____
4.
# Output appears in the _______
5.
# A _______ tells the computer what to do

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A # Python is a spoken language
B # A program is written by a human
C # The computer reads and runs it
Question 2
A # Each program can only have one instruction
B # Python programs are saved as .py files
C # Running a program means the computer executes it
Question 3
A # The computer follows instructions in any order
B # Python executes code from top to bottom
C # Humans write programs, computers run them
Question 4
A # Python is a text-based language
B # Instructions run from bottom to top
C # Each instruction is on its own line
Question 5
A # Python is used all over the world
B # Python programs cannot display text
C # It is one of the most popular languages

Answer Key

What is Python?
Section A: Quick Questions
Q1
B — True
Q2
A — Program
Q3
A — Top to bottom
Q4
B — The console
Q5
A — A human
Section B: Match the Pairs
Q1
program → A set of instructions written by a human that tells a computer what to do
Q2
console → The panel where the output of a running program is displayed
Q3
Python executes code top to bottom → # line 1 runs first # line 2 runs second
Q4
Humans write programs; computers run them → # You type this # Python runs this
Q5
# Python runs bottom to top → Wrong — Python always executes from top to bottom, line by line
Q6
# The console is where you write code → Wrong — you write code in the code area; the console shows output
Section C: Definitions
Q1
program — A set of instructions written in a programming language that tells a computer exactly what to do, step by step
Section D: Fill in the Blanks
Q1
# This is a Python program
Q2
# Each line is one instruction
Q3
# Python runs line by line
Q4
# Output appears in the console
Q5
# A program tells the computer what to do
Section E: Spot the Error
Q1
A — Python is a programming language, not a spoken language. Line 0 is wrong.
Q2
A — A program can have many instructions — it is not limited to just one. Line 0 is wrong.
Q3
A — Python always runs instructions in order from top to bottom, not in any order. Line 0 is wrong.
Q4
B — Python runs instructions from top to bottom, not bottom to top. Line 1 is wrong.
Q5
B — Python programs absolutely can display text — that is one of the first things you learn. Line 1 is wrong.