GRADE 7 · COMPUTING · UNIT 1 · LESSON 1.13

Block it out: Moving from blocks to text

Random questions and a star number

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

6 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Random questions and a star number

Book extension, project or review · original companion practice

A question program may collect both text and numbers. Keep text responses for a final sentence and convert only the responses needed for a numeric total. Plan every input in order and check that the final summary uses the matching variables. A game total is not a fact about a learner.

Today’s two goals
  • Identify the text and numeric data needed for the six-question brief.
  • Complete a flowchart that stores the responses and calculates the requested total.
Original PaxaKids illustration for Random questions and a star number. 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 question program may collect both text and numbers. Keep text responses for a final sentence and convert only the responses needed for a numeric total. Plan every input in order and check that the final summary uses the matching variables. A game total is not a fact about a learner.

Concept to practise: Random questions and a star number.

Work through an example

If an invented alias is Nova and two numeric answers are 4 and 6, the summary can include Nova while the numeric total is 10. Adding the strings "4" and "6" would produce "46", not the intended total.

Try before your workbook

A game collects the alias Comet and numeric answers 3, 5 and 2. Which responses belong in the star-number calculation, and what is the total?

Check my readiness thinking

Only the numeric answers belong in that calculation: 3 + 5 + 2 = 10. Comet remains a string for the summary. It should not be converted or added to the numeric total.

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.

Six responses, one clear summary

Our goal: plan and complete a questionnaire that stores six responses, combines them into one sentence and adds the three numeric responses.

Use an invented profile. The title refers to a varied set of questions; this challenge does not require a random-number generator. The star number is a computed total, not a score.

Define the six inputs

Define the six inputs — original model
No.VariableQuestion / responseType
1nameAn invented namestr
2colourFavourite colourstr
3days_weekDays in a weekint
4seconds_hourSeconds in an hourint
5hobbyFavourite hobbystr
6days_yearDays in a non-leap yearint

Complete an original starter

QUESTIONNAIRE_PAXASTARTER.PY
print("Welcome to the profile questions.")
name = input("Invented name: ")
colour = input("Favourite colour: ")
# TODO: ask for days_week, seconds_hour, hobby, days_year
# TODO: convert the three numeric responses to int
# TODO: add the numeric responses into star_number
# TODO: print one sentence containing ALL SIX responses
# TODO: display the star number separately

Use two test profiles

Use two test profiles — original model
TestText responses: name / colour / hobbyNumeric responses: week / hour / year
AMaya / Blue / Drawing7 / 3600 / 365
BSami / Green / Chess1 / 2 / 3
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.

Random questions and a star number6 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 6 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.

Student worksheet only · PDF · 4.7 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 6 worksheets

Worksheet 1

  1. Question 1: What must the combined sentence include? all six stored responses
  2. Question 2: Which responses contribute to the star number? the three numeric responses
  3. Question 3: What should happen to a numeric input before adding it? convert it to a suitable numeric type

Worksheet 2

  1. Question 4: Which expression adds the three numeric responses? days_week + seconds_hour + days_year
  2. Question 5: Which conversion suits the whole-number response for seconds_hour? int(input("Seconds per hour: "))

Worksheet 3

  1. Question 6: Why is input without casting unsuitable for the numeric total? it returns text, so + can join strings
  2. Question 7: Which stored value should be used to show the chosen colour? colour
  3. Question 8: How many final outputs does the brief require after the questions? a combined sentence and a star-number output

Worksheet 4

  1. Question 9: What star number should test A produce? 3972
  2. Question 10: What star number should test B produce? 6
  3. Question 11: What should also change when switching from profile A to B? all six values in the combined sentence

Worksheet 5

  1. Question 12: Complete the flowchart for all six questions in page B order. Start with a welcome, store each response, calculate the numeric total, output one sentence containing all six responses, display the star number and Stop. Show which responses are integers. Flowchart: Start -> welcome output -> input name -> input colour -> input days_week as integer -> input seconds_hour as integer -> input hobby -> input days_year as integer -> star_number = days_week + seconds_hour + days_year -> output one combined sentence containing all six stored responses -> output star number -> Stop. Grouped input nodes are acceptable if order and individual stored names/types are clear. Use input/output parallelograms, process rectangle, arrows and terminators. No selection or random-number generator needed. Text contains all six values, not only name/colour/hobby. Teacher checks this matches completed code. Grown-up review; personal evidence is required.

Worksheet 6

  1. Question 13: Show your completed program and test evidence for profiles A and B: inputs, expected summary contents and star number, actual outputs, pass/fail and any repair/retest. Explain why only three inputs are converted to int, and how your summary includes all six responses in one sentence. Require all six inputs in correct order, three str and three int, numeric addition (not concatenation or constant total), a single sentence containing every response, separate labelled star-number output, saved program and two test records. A yields 3972 and includes Maya, Blue, 7, 3600, Drawing, 365. B yields 6 and includes Sami, Green, 1, 2, Chess, 3. Wording and capitalization may vary; preserve each entered text value. Numeric test B intentionally artificial; no validation of factual knowledge demanded. Accept comma-separated print or f-strings with coherent sentence punctuation. Program must run for valid whole-number inputs; validation of invalid strings optional extension. Actual run evidence must be honest; paper traces labelled. Private teacher reference solution and original CSV supplied; no publisher file assumed available. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Random questions and a star number 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.