04: Python: Variables

This activity is designed to help you learn how to use python to write a program that uses and stores data in variables.

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

As well as learning how to debug syntax errors, so far we’ve looked at how to do input and output in python. The next step is to learn how to store the data that’s been input and use it as part of the output. That’s where variables come in handy.


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.

5 thoughts on “04: Python: Variables

  • Pingback: Python for beginners: free interactive self marking activities

  • January 5, 2019 at 4:10 am

    please check chalenge one :
    print(β€œHello ” + name + ” an!” )
    (it still gives me an error!)

  • January 5, 2019 at 8:47 am

    Replace the ” an!” with “!” and you should be OK πŸ˜€

  • April 10, 2020 at 3:20 pm

    need help with line 7 where do you put the second + food + ? in the line

    • April 11, 2020 at 8:50 am

      Try printing food + “? I love ” + food + “!”


Leave a Reply to j Cancel reply

Your email address will not be published. Required fields are marked *