GRADE 7 · COMPUTING · UNIT 1 · LESSON 1.6
Block it out: Moving from blocks to text
Data types – string, integer and real
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Data types – string, integer and real
A string stores text, an integer stores a whole number, and a float represents a floating-point numeric value. Digits can still be text: a code with leading zeros should usually remain a string. The input function returns a string even when the learner types digits.
- Distinguish string, integer and real-number data in the source examples.
- Explain why a digit sequence may be stored as text, including a value with a leading zero.

Explore the clues
Tap one card to find out more.
Understand the idea
A string stores text, an integer stores a whole number, and a float represents a floating-point numeric value. Digits can still be text: a code with leading zeros should usually remain a string. The input function returns a string even when the learner types digits.
Concept to practise: Data types – string, integer and real.
Work through an example
The string "0048" preserves all four characters. Converting it to an integer produces 48, which suits arithmetic but loses those leading zeros. A value such as 7.5 needs a numeric type that can represent a fractional part.
Try before your workbook
Choose suitable types for an invented membership code "0032", a count of 8 books, and a measured length of 2.5 metres. Explain the code choice.
Check my readiness thinking
Use a string for "0032", an integer for 8 and a float for 2.5. The code is an identifier whose exact characters matter; it is not a quantity to calculate with.
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.
Choose the kind of data
A string is text, even if its characters are digits. An integer is a whole-number value, including zero and negative values. A float represents a number with a fractional part, or a value written in floating-point form such as 6.0.
Classify a fictional club profile
FIVE ASSIGNED VALUES
member = "Maya"
age = 12
card = "0048"
club = "Coding"
credit = 14.5Preserve a leading zero
TEXT CODE
card = "0048"
print(card)NUMBER
card = 48
print(card)Choose types for a purpose
Complete the original starter
ORIGINAL PAXA STARTER
member = "Maya"
age = 12
card = "0048"
club = "Coding"
credit = 14.5
print("Member:", member)Change values and justify the types

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
- Lesson 1.1: Comparing Scratch and Python
- Lesson 1.2: Using Python
- Lesson 1.3: Using Python IDLE in Script mode
- Lesson 1.4: Variables
- Lesson 1.5: Adding more information to a program
- Lesson 1.6: Data types – string, integer and real
- Lesson 1.7: Casting
- Lesson 1.8: Flowcharts and algorithms
- Lesson 1.9: BIDMAS in Python
- Lesson 1.10: Error detection and correction
- Lesson 1.11: Making choices IF THEN ELSE in flowcharts
- Lesson 1.12: Sub-routines
- Lesson 1.13: Random questions and a star number
- Lesson 1.14: Final project
- Lesson 1.15: Evaluation
- 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.
Opening your PDF…
Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.
You’ve completed the checked activities.
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 · 8.4 MiB · No answer key included
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
- Question 1: Which Python value is a string? "12"
- Question 2: Which Python value is an integer? -4
- Question 3: What is the type of 6.0 in Python? float
Worksheet 2
- Question 4: What is the type of member? string
- Question 5: What is the type of age? integer
- Question 6: What is the type of credit? float
- Question 7: Copy the card value as text, preserving every digit. 0048
Worksheet 3
- Question 8: What does the text-code program display? 0048
- Question 9: What does the number program display? 48
- Question 10: Why is a string useful for this card code? it preserves the leading zeros
Worksheet 4
- Question 11: Which assignment fits a count of 18 badges? badges = 18
- Question 12: Which assignment fits a measured length of 2.5 metres? length = 2.5
- Question 13: Which statement is correct? A quoted digit sequence can be a string.
Worksheet 5
- Question 14: Add the four missing print lines. Record all five output lines in order, preserving leading zeros. Label your evidence as a run or paper trace. Added lines use print("Age:",age),print("Card:",card),print("Club:",club),print("Credit:",credit). Matching single-quoted labels are acceptable. Output: Member: Maya; Age: 12; Card: 0048; Club: Coding; Credit: 14.5, each label followed by a space. Require actual variable lookup and preserved 0048, not numeric 48 or quoted variable names. Honest run/trace status required. Grown-up review; personal evidence is required.
Worksheet 6
- Question 15: Record the changed output and name the type of each stored value. Explain why card is a string while age is an integer and credit is a float. Use your actual values as evidence. Changed output: Member: Sami; Age: 13; Card: 0072; Club: Robotics; Credit: 8.25, with spaces after labels. Types: member string, age integer, card string, club string, credit float. Card is an identifier whose leading zeros must survive; age is a whole-number value; credit needs a fractional value. Allow str/int/float terminology. No claim that float is an exact representation of all real numbers. Run or trace must be labelled accurately. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — pages 22–23
- PaxaKids Grade 7 Computing Lesson 1.6: Data types – string, integer and real — pages 1–6
Computing for your homeschool day
Explore Data types – string, integer and real 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.
