GRADE 7 · COMPUTING · UNIT 1 · LESSON 1.1

Block it out: Moving from blocks to text

Comparing Scratch and Python

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

8 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Comparing Scratch and Python

A program follows ordered instructions. Input supplies data, processing changes it, and output communicates the result. Scratch joins blocks; Python expresses the same steps as precisely typed text. Compare what the program does as well as how its editor looks.

Today’s two goals
  • Identify equivalent input, processing and output in a Scratch example and its Python version.
  • Compare the features of the block editor and Python IDLE using evidence from the source screenshots.
Original PaxaKids illustration for Comparing Scratch and 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

A program follows ordered instructions. Input supplies data, processing changes it, and output communicates the result. Scratch joins blocks; Python expresses the same steps as precisely typed text. Compare what the program does as well as how its editor looks.

Concept to practise: Comparing Scratch and Python.

Work through an example

For a subtracting calculator, entering 18 and 7 supplies two inputs. Subtraction produces 11 and displaying 11 is output. A different language should preserve that calculation, not reverse the numbers.

Try before your workbook

A program reads 15 and 4, calculates first minus second, then displays the result. Identify the processing step and predict the output.

Check my readiness thinking

The processing is 15 minus 4, so the output is 11. Reading the numbers is input; showing the answer is output. Editor appearance does not change those roles.

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.

Same problem, two ways to program

Our goal: compare blocks and Python, identify input, processing and output, and explain why exact syntax matters.

Maya and Sami need a calculator that subtracts the second whole number from the first. The same ordered instructions can be expressed as blocks or typed Python.

Read equivalent instructions

Original block plan
  1. when green flag clicked
  2. ask [First number?] and wait; set first to answer
  3. ask [Second number?] and wait; set second to answer
  4. set result to (first - second)
  5. say result
Equivalent original Python model
first = int(input("First number: "))
second = int(input("Second number: "))
result = first - second
print("Result:", result)

Compare the workspaces

The complete labelled editors diagram is provided in the original workbook. Use its exact labels when answering the workbook questions.

Trace the calculation carefully

Use result = first - second every time. A negative result is allowed. The order of subtraction matters; this is not a rule for finding an always-positive difference.

Discussion: Explain to a partner how reversing the two input values changes the result.

Syntax is part of the instructions

Syntax means the rules for writing code. Python distinguishes upper- and lower-case letters. In these examples the built-in function is print, and the text must be inside matching straight quotation marks. A text editor can contain code that still has errors.

Compare features, not appearances

A block palette offers ready-made blocks. A Python Editor lets you type instructions. Both programs still need a clear sequence and a way to show the result.

Apply, test and explain

Practical route: with your teacher, recreate the page B block plan in Scratch and type the Python program in an IDLE Editor. Save the script as subtraction_compare.py, then choose Run > Run Module. Try (26, 9), (9, 26) and (14, 14).

Paper route: trace both page B plans with the same inputs. Label your evidence “paper trace” so it is clear that software was not run.

Explain your comparison

Original input, process and output model
StageAction
INPUTTwo whole numbers
PROCESSFirst minus second
OUTPUTDisplay the result
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.

Comparing Scratch and Python8 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 8 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 8 worksheets

Worksheet 1

  1. Question 1: Which value is an input to this calculator? a number the user enters
  2. Question 2: Which step is processing? subtract the second value from the first

Worksheet 2

  1. Question 3: Which Python part asks for a value? input(...)
  2. Question 4: Which block corresponds to the final Python line? say result

Worksheet 3

  1. Question 5: Which labelled Scratch area holds the joined program blocks? B / b
  2. Question 6: Which labelled IDLE area holds a saved script? D / d

Worksheet 4

  1. Question 7: First = 26 and second = 9. What value is printed after Result:? 17
  2. Question 8: First = 9 and second = 26. What value is printed after Result:? -17 / −17
  3. Question 9: First = 14 and second = 14. What value is printed after Result:? 0

Worksheet 5

  1. Question 10: In a fresh Python session, which line prints Ready? print("Ready")
  2. Question 11: What is similar about a Scratch variable and a Python variable? Each can refer to a stored value used by the program.
  3. Question 12: A learner removes the output instruction. What is missing? the step that displays the result

Worksheet 6

  1. Question 13: What must both versions preserve? the order and meaning of the instructions
  2. Question 14: Which comparison is accurate? Both environments let us create and run instructions.

Worksheet 7

  1. Question 15: Record your three tests as first value, second value, predicted result and observed result (or traced result). Then state whether both versions follow the same input/process/output sequence. Look for three correctly ordered tests: 26,9 gives17; 9,26 gives-17;14,14 gives0. Predictions must be recorded before observations. Accept accurately labelled paper traces. Learner identifies both inputs, ordered subtraction and displayed output; genuine run evidence may differ in prompt appearance but not numeric result. Grown-up review; personal evidence is required.

Worksheet 8

  1. Question 16: Give one similarity and one difference between the two programming environments. Use a named area from page C and a concrete instruction from page B as evidence. A supported similarity: both accept values, calculate in sequence and display a result; both can store values in variables. A supported difference: Scratch selects and joins blocks in code area B, whereas Python code is typed in Editor D and text output appears in Shell E. Exact Python spelling/quotes/brackets matter. Avoid absolute claims about all block or text editors. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Comparing Scratch and 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.