GRADE 7 · COMPUTING · UNIT 1 · LESSON 1.2

Block it out: Moving from blocks to text

Using Python

Read a little. Try the workbook. Check your answers. Choose one section below to get started.

7 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Using Python

The Python Shell runs an instruction when you submit it at the prompt. A script stores instructions in a file. Python names are case-sensitive: print and Print are different. Correct case depends on the particular name; it is not true that every Python name must be lowercase.

Today’s two goals
  • Enter and run simple print commands and arithmetic expressions in the Python shell.
  • Predict the result of an expression and compare it with the interpreter output.
Original PaxaKids illustration for Using Python. Precise program text and data are supplied in the workbook models.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

Explore the clues

Tap one card to find out more.

Understand the idea

The Python Shell runs an instruction when you submit it at the prompt. A script stores instructions in a file. Python names are case-sensitive: print and Print are different. Correct case depends on the particular name; it is not true that every Python name must be lowercase.

Concept to practise: Using Python.

Work through an example

In the Shell, print("Ready") displays Ready. The expression (5 + 2) * 3 gives 21 because the brackets group the addition. Quotes mark text; paired brackets enclose a function argument or grouped calculation.

Try before your workbook

What does (4 + 6) * 2 produce? Explain why print("Go") and Print("Go") cannot be assumed equivalent.

Check my readiness thinking

The calculation gives 20. The built-in function is named print with a lowercase p; Print is a different name and is not that built-in function.

Your original programs and learning models

These original PaxaKids program and data models support your workbook. Some examples deliberately contain faults to investigate. Follow their headings and preserve exact code case, punctuation and order. Traces and supplied records are not claims of physical testing.

Meet the interactive Shell

Our goal: enter short commands, predict their results and repair simple typing errors.

The Python Shell runs a command when you enter it. The interpreter carries out Python instructions. At the prompt >>>, type your command and press Enter. The prompt itself is not part of your code.

Separate commands from results

ORIGINAL SHELL TRANSCRIPT
>>> print("Ready")
Ready
>>> (6 + 8) * 2
28
>>> 18 / 3
6.0
>>>

Type text precisely

Text goes inside matching single or double straight quotation marks. The function name print is lower-case. A capital P makes Print a different name. In a fresh session it has not been defined. Changing case inside a quoted message changes the message, rather than the function name.

Repair brackets and grouping

INCOMPLETE
print("Go)
print((6 + 8) * 2
REPAIRED
print("Go")
print((6 + 8) * 2)

Ask for help and try again

In the Shell, help(print) asks for information about print. Read an error message, inspect the command, correct it and enter the complete command again.

For a program you want to save and run repeatedly, use an Editor window. A Shell transcript can be saved as text, but it is not automatically a clean runnable script.

Predict, run and record

YOUR COMMANDS
print("Paxa")
(9 + 3) * 4
24 / 6 * 2

Design a small Shell experiment

Invent four arithmetic expressions: one addition, one subtraction, one multiplication, and one that adds two values before multiplying. Use modest whole numbers so you can check the results mentally. Do not divide by zero.
Paxa the Fox

Try one step with Paxa!

Trace code carefully and preserve exact spelling, case and order. Use invented practice data. Save personal responses before leaving.

Our Unit 1 learning path
  1. Lesson 1.1: Comparing Scratch and Python
  2. Lesson 1.2: Using Python
  3. Lesson 1.3: Using Python IDLE in Script mode
  4. Lesson 1.4: Variables
  5. Lesson 1.5: Adding more information to a program
  6. Lesson 1.6: Data types – string, integer and real
  7. Lesson 1.7: Casting
  8. Lesson 1.8: Flowcharts and algorithms
  9. Lesson 1.9: BIDMAS in Python
  10. Lesson 1.10: Error detection and correction
  11. Lesson 1.11: Making choices IF THEN ELSE in flowcharts
  12. Lesson 1.12: Sub-routines
  13. Lesson 1.13: Random questions and a star number
  14. Lesson 1.14: Final project
  15. Lesson 1.15: Evaluation
  16. Lesson 1.16: What can you do?
For grown-ups: using this lesson

Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.

Read one explanation, discuss the model and try the readiness check before the workbook. Choose “Mark lesson finished” when ready. Optional account progress saves lesson position and completion across devices; save personal responses before leaving.

2. Fill in your workbook

Read the teaching and the complete workbook instructions. Choose, write or draw; Answer list offers larger controls. Trace code precisely and distinguish predictions from actual tests. Review designs, explanations and drawings with a grown-up.

Using Python7 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

TAKE YOUR PRACTICE OFFLINE

3. Download the student worksheet

All 7 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.

Student worksheet only · PDF · 8.0 MiB · No answer key included

Download worksheet PDF ↓

TRY FIRST, THEN CHECK TOGETHER

Download the student worksheet →

4. Answers & guidance

Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.

Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.

Show answers for all 7 worksheets

Worksheet 1

  1. Question 1: Which mode runs short commands immediately? interactive mode
  2. Question 2: Which symbol is the standard main Shell prompt? >>>
  3. Question 3: What does the Python interpreter do? carries out Python instructions

Worksheet 2

  1. Question 4: What text appears after the first command? Ready
  2. Question 5: What value does the grouped addition-then-multiplication produce? 28
  3. Question 6: Copy the displayed result of the division exactly. 6.0

Worksheet 3

  1. Question 7: Which line prints Go? print("Go")
  2. Question 8: What is missing in print("Go)? a closing quotation mark
  3. Question 9: Which change still prints the same text? use matching single quotes around Go

Worksheet 4

  1. Question 10: Which complete expression adds 6 and 8 before multiplying by 2? (6 + 8) * 2
  2. Question 11: What is the value of 6 + 8 * 2? 22
  3. Question 12: What is the value of 12 / 3 * 2 in Python? 8.0

Worksheet 5

  1. Question 13: Which command asks for help about print? help(print)
  2. Question 14: Which action is useful after an error? inspect, correct and rerun the command
  3. Question 15: Which place is best for saving a reusable script? an IDLE Editor

Worksheet 6

  1. Question 16: Record each command with your predicted and actual output. Include the faulty command, its repaired version and the error message or error type you observed. Label any unrun work clearly. Expected outputs: Paxa;48;8.0. The faulty quoted command raises a syntax error; exact wording depends on Python version. A valid repair is print("Paxa") or print('Paxa'). Look for prediction-before-run evidence and an accurately labelled observation. Paper predictions may be accepted as preparation, not as proof of software execution. Grown-up review; personal evidence is required.

Worksheet 7

  1. Question 17: Write your four expressions and predicted results. Run them if available, record the actual results, and explain how one pair of parentheses changes the order of calculation. Accept any four complete valid expressions meeting the four purposes, with correct results and honest run/prediction labels. For the grouped expression, addition must be inside parentheses and multiplied afterwards. Explanation connects grouping to the operations performed first; do not teach division before multiplication as a universal rule. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Using Python with this free Grade 7 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.

Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.

Understand your results

Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.

Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.

For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.

The book pages identify the related teaching topic. The explanations, characters, programs and exercises here are original PaxaKids companion practice. Practical tasks require the appropriate editor and, where applicable, suitable equipment. A design or paper trace is not a verified hardware result. Only completed, reviewed lessons are listed.

Explore the Cambridge Lower Secondary Computing curriculum for programme background. PaxaKids is an independent learning resource.