GRADE 7 · COMPUTING · UNIT 1 · LESSON 1.5

Block it out: Moving from blocks to text

Adding more information to a program

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

Adding more information to a program

input displays a prompt and returns the typed response as a string. Assign that response to a variable if the program must use it later. Keep the prompt, the variable name and the response distinct. Use an invented alias for practice.

Today’s two goals
  • Use input() to collect a response and store it in a variable.
  • Translate a Scratch ask-and-answer sequence into Python input and output statements.
Original PaxaKids illustration for Adding more information to a program. 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

input displays a prompt and returns the typed response as a string. Assign that response to a variable if the program must use it later. Keep the prompt, the variable name and the response distinct. Use an invented alias for practice.

Concept to practise: Adding more information to a program.

Work through an example

In alias = input("Choose an alias: "), typing Nova stores the string Nova in alias. The prompt is not the stored answer. print("Welcome", alias) then combines literal text with the saved response.

Try before your workbook

A learner types Comet at the prompt in nickname = input("Nickname: "). What value does nickname hold, and why should it be printed without quotation marks?

Check my readiness thinking

nickname holds the string Comet. Printing nickname looks up that response; printing "nickname" would display the word nickname instead.

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.

Let the user supply the information

Our goal: collect a response with input, store it and display an informative message.

A fixed assignment always starts with the value written in the code. An input call shows a prompt and waits for the user to type a response. The returned response can be assigned to a variable.

Read a complete conversation

club_entry.py
alias = input("Club alias: ")
choice = input("Challenge number (1-10): ")
print("Alias:", alias)
print("Challenge:", choice)

Translate an ask-and-answer plan

PLAN A
word = input("Team word: ")
print("Team word:", word)
PLAN B
word = "answer"
print("Team word:", "word")

Keep each response in the right place

Maya asks for a team word and then a project title. She stores the first response in team and the second in project. If she prints project beside the label “Team:”, the code may run but the message will be misleading. Test the meaning of the output as well as its syntax.

Plan the peer check

  1. Ask for team; assign the response to team
  2. Ask for project; assign the response to project
  3. Display Team: followed by team
  4. Display Project: followed by project

Create the team conversation

Translate the page E plan into Python. Save the result as team_project.py. Test twice with distinct pairs, such as Orbit/Garden and Wave/Robot. Ask a partner to check that each response appears beside the matching label. If you cannot run it yet, label your work “paper trace”.

Make and test the club entry

Use the page B program as a starting point. Keep the alias and challenge responses in separate variables. Ask your partner to enter two fictional aliases with different challenge values in the stated 1 to 10 range. This task requests that range; you are not required to write a validation loop.
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.

Adding more information to a program7 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.4 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 function collects a typed response? input
  2. Question 2: What is a prompt? a message asking the user for input
  3. Question 3: Which part of alias = input("Alias: ") receives the response? alias

Worksheet 2

  1. Question 4: What text is assigned to alias in this run? Star
  2. Question 5: What response is assigned to choice? 7
  3. Question 6: Which instruction displays the stored alias? print("Alias:", alias)

Worksheet 3

  1. Question 7: Which plan collects and displays the user’s response? Plan A
  2. Question 8: In Plan B, what literal word is assigned to word? answer
  3. Question 9: Which Scratch value carries the typed reply? answer

Worksheet 4

  1. Question 10: Which instruction matches the Team: label to the stored team response? print("Team:", team)
  2. Question 11: Which test is more likely to reveal swapped responses? enter two clearly different words
  3. Question 12: The user enters 7. What type does plain input return? string

Worksheet 5

  1. Question 13: Which instruction should come before displaying project? collect and store the project response
  2. Question 14: Your partner sees the right labels but the wrong values. What should you check? which variable each print call uses

Worksheet 6

  1. Question 15: Write your program and record the expected and actual output for both runs. Explain how your partner checked that the responses were stored and displayed in the correct places. Require team=input(...), project=input(...), print("Team:",team), print("Project:",project) in correct order, allowing sensible prompt wording and matching single quotes. Runs should produce Team: Orbit /Project: Garden and Team: Wave /Project: Robot. Accept other distinct test pairs with correct output. Record honest run/trace status and a concrete peer check of labels and values. Grown-up review; personal evidence is required.

Worksheet 7

  1. Question 16: Record the two test conversations, including prompts, responses and labelled output. Explain the difference between the prompt text and the stored response, and state whether you ran or traced the code. Look for two complete input/output conversations using the page B code or an equivalent valid sequence. For example Star/7 and Moon/2. Prompts are literal programmer-written text; responses are user-entered strings stored in alias/choice. The output must use those variables, not quoted names. Do not credit a claim that this program rejects out-of-range input; it contains no range check. No arithmetic conversion is required. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Adding more information to a program 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.