Topic Seven (1.7): Programming Part 2 - Basics

Introduction Icon.png Introduction

We will start by learning what a variable is, deciding what data type a variable should be, how to declare a variable and use it in an expression.
You will also be introduced to some arithmetic operators used for calculations.

By the end of this topic you should know:

  • How variables are declared (using different data types).
  • The syntax of assignment and input/output statements.

Watch Icon.png Watch

These videos introduce you to variables with different data types, you also see how a variable can be assigned an input:

WATCH – Basic Python 3 for Beginners 1 & 2: Introduction, Comments, & Printing (YouTube) Links to an external site.

WATCH - Basic Python 3 for Beginners 3: String Variables – A Look at String Variables (YouTube) Links to an external site.

WATCH - Basic Python 3 for Beginners 4: Integers and Floats (YouTube) Links to an external site.

WATCH – Python Input (YouTube) Links to an external site.

WATCH – Python Variables and Data Types (YouTube) Links to an external site.

Here you can see an arithmetic operator that you can use to assign a value:

WATCH – Python Assignment Statement (YouTube) Links to an external site.

This video informs you about sequences:

WATCH - Sequences in Python (YouTube) Links to an external site.

Read & Make Notes Icon.png Read and Practice

To support your understanding the textbook gives good understanding of programming theory and python program examples.

For this module you can read pages 243 to 249 of the textbook and try and complete task 14.01.

If you wish you can also start practicing writing pseudocode although this will be covered again in Modules 9 and 11.

If you feel you need some extra practice you can click on the link below:

EXPLORE – Variables and Data Types (Learn Python) Links to an external site.

Worksheet Icon.png Assignment

When you have completed all the activities and are fully prepared and feel confident with the material, you should complete Assignment One and submit it to your tutor via Canvas for marking and feedback.