02: Python: Input

This activity is designed to help you learn how to use python to write a program that asks the user for input.

Write a program that asks for input
Python Input: Write a program that asks for input

Contents:

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.

01: Python: Output

This activity is designed to help you learn how to use python to write a program that displays an output.

Write a program that displays an output
Python output: Write a program that displays an output

Contents:

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.

Python for beginners: free interactive self marking activities

Learning to understand, write and debug python programs can be hard work, especially if python is the first programming language you’re learning.

This set of resources is aimed a beginners who want a quick reference guide and a variety of programming challenges of varying difficulty where you get instant feedback without having to sign up or pay to get going.

This page contains links to a set of self-marking python activities that let you track your progress and download and / or print off a PDF certificate for each python skill.

The aim is to publish a complete set of 20 activities but it’s a work in progress so do let me know if you spot any mistakes or can think of a way to improve any of the activities.

Each activity has four sections:

Try it, debug it, extend it
Try it, debug it, extend it
  1. Theory: Learn the key words and concepts
  2. Try It: Look at and run some working example code
  3. Debug It: Practise debugging some common errors
  4. Extend It: Adapt and extend code with ideas for bigger projects

Published Python Activities:

Here’s the activities I’ve published so far:

01: Output

Write a program that displays an output
Output: Write a program that displays an output

02: Input

Write a program that asks for input
Input: Write a program that asks for input

03: Syntax Errors

Find and fix common errors in your code
Syntax errors: Find and fix common errors in your code

04: Variables

Use and store data in variables
Variables: Use and store data in variables

05: Naming Conventions

Use variables and constants with sensible names
Naming conventions: Use variables and constants with sensible names

06: Data Types

Convert and use different types of data
Data types: Convert and use different types of data

07: Runtime Errors

Find and fix common errors in your code
Runtime errors: Find and fix common errors in your code

08: Sequence

Plan the order of instructions carefully
Sequence: Plan the order of instructions carefully

09: Selection

Tell your code how to make decisions
Selection: Tell your code how to make decisions

10: Logic errors

Find and fix common errors in your code
Logical errors: Find and fix common errors in your code

11: Lists

Store and use lots of data in the same variable
Lists: Store and use lots of data in the same variable

12: Iteration

Make code repeat as many times as you want
Iteration: Make code repeat as many times as you want

On the next page you’ll see a list of all of the activities that are planned to be published in the future.