Python Programming - Computational Thinking Homework 2 (IF statements)
(Greg Reid has written two Computing text books for the Scottish education system. His resources are used in thousands of schools all over the world.)

Computational Thinking (learning to think in a logical/problem solving way) is the buzz word in the teaching of programming. By teaching students to predict the outcome of small pieces of code they naturally become better at building their own programs.

This homework is based around the programming language Python (version 3). Students are given small pieces of code and asked to predict the output when certain inputs are entered.

Python is an open source programming language. It’s use is not subject to Copyright.

Have fun. My students loved these!

Previously downloaded 30,000 times on a few websites comments have included:
"Thanks, these look like really good examples and introduce code in a fun and engaging way."
"Very useful. I'll use for a Maths class as well."
"Great examples to understand code. Thank you for sharing it."
Save for later
  • Python-Homework---Computational-Thinking-2.pdf
  • (MS)-Python-Homework---Computational-Thinking-2.pdf

About this resource


Created: Sep 16, 2015

Updated: Jul 2, 2018


pdf, 130 KB



pdf, 147 KB


Report a problem

This resource is designed for US teachers. View UK version .

Tes Paid License

How can I re-use this?