Grade 7 Tracing Code (Python) Worksheet with Answers
Grade 7 (US) · Year 8 (UK) · Class 7 (India) · Computer Science
Unit 5: Going FurtherAdvanced: Reading CodeCSTA 2-AP-12Advanced
Reading short Python programs with variables, if/else and loops and working out what they print. This free middle school worksheet has 12 questions and a full answer key. Print it or save it as a PDF — every answer is checked by code, not guessed.
- Answer keys checked by code
- No ads, ever
- No student accounts needed
- Safety & privacy
Tracing Code (Python)
Grade 7 · Computer Science
Name
Class
Date
Learning goal: Advanced: Reading Code · CSTA 2-AP-12
Directions: Read each question carefully and write your answer on the line. Use the diagram to help you.
RememberReading Python
- 1
What does this program print?
- 2
What does this program print?
- 3
What does this program print?
- 4
What does this program print?
- 5
What does this program print?
- 6
What does this program print?
- 7
What does this program print?
- 8
What does this program print?
- 9
What does this program print?
- 10
What does this program print?
- 11
What does this program print?
- 12
What does this program print?
★ Challenge corner for fast finishers
What is the largest whole number you can store in 6 bits?
How did I do?
Teacher's comments
Free printable worksheets with answer keys · aethelsystems.com/worksheets/computer/7/code_tracing
Answer key — Tracing Code (Python) (Grade 7)
- 1.LM
- 2.PR
- 3.PN
- 4.30
- 5.small
- 6.small
- 7.12
- 8.30
- 9.big
- 10.20
- 11.18
- 12.6
- ★63
Answer key (click to show)
- 1.LM
- 2.PR
- 3.PN
- 4.30
- 5.small
- 6.small
- 7.12
- 8.30
- 9.big
- 10.20
- 11.18
- 12.6
- ★63 (challenge corner)
Need another Tracing Code (Python) worksheet?
Generate unlimited fresh versions at easy, medium or hard difficulty, each with its own answer key. Free during our launch — no card needed.
Create a free accountHow to use this worksheet
- Works well as a bell-ringer, exit ticket, homework set or quick quiz.
- Have students self-check with the answer key, then correct their own mistakes before you review.
- Generate a new version of the same topic for a re-test, so students can't just memorise the answers.
Related worksheets
Can't find what you need? Tell us which worksheet to make next.
Frequently asked questions
Does this Grade 7 Tracing Code (Python) worksheet come with answers?
Yes. The full answer key is on this page, and it prints on its own page after the questions. Every answer is calculated or checked by code rather than written by an AI model, so the key is always correct.
How do I print it or save it as a PDF?
Click "Download PDF" to save a ready-to-print PDF with the answer key on the last page, or click "Print" to send the worksheet and answer key straight to your printer.
Can I get a different Tracing Code (Python) worksheet?
Yes. Create a free account to generate as many fresh Grade 7 Tracing Code (Python) worksheets as you like, at easy, medium or hard difficulty, each with its own answer key.
Is this worksheet free?
Yes. This worksheet is free to print, and Practice Sheet is free to use during our launch with no card needed.