top of page

LEARNING OBJECTIVES

Design a wix page template for Computer Science.

SUCCESS CRITERIA

Success Criteria:

  • Choose a colour scheme

  • Create suitable text boxes

  • Decide on content layout

3.1  Programming Techniques

Learners should have studied the following:

  • 3.1.1  how to identify and use variables, operators, inputs, outputs and assignments

  • 3.1.2  how to understand and use the three basic programming constructs used to control the flow of a program: Sequence; Selection; Iteration

  • 3.1.3  how to understand and use suitable loops including count and condition controlled loops

  • 3.1.4  how to use different types of data, including Boolean, string, integer and real, appropriately in solutions to problems

  • 3.1.5  how to understand and use basic string manipulation

  • 3.1.6  how to understand and use basic file handling operations:

    • open

    • read

    • write

    • close

  • 3.1.7  how to define and use arrays (or equivalent) as appropriate when solving problems

  • 3.1.8  how to understand and use functions/sub programs to create structured code.

3.1.1 variables, operators, inputs, outputs and assignments

  • how to identify and use variables, operators, inputs, outputs and assignments

Variables

In a program, data values can be constant or variable. If values are variable they can be changed by the program and the user.

When a program is run, the data values are held in memory whilst they are being worked on.

Variables are data values that can change when the user is asked a question, for example, their age. Variables may change during program execution.

A variable is a memory location. It has a name that is associated with that location. The memory location is used to hold data. The key difference when comparing a constant to a variable is that the value associated with a variable name may change during program execution. For example 'highScore' would need to be variable to change throughout a game.

The content and organisation of a computer's memory is not fixed - so neither is the value that is pointed at by a variable.

When data is read from a variable, the content of the memory location is copied and used in calculations.

variables in python...

WE ARE LEARNING..​

Operators

An operator is a symbol that tells the computer to perform a certain logical or mathematical or logical manipulations.

 

Arithmetic Operators

Many of the operators you have encountered so far may be mathematical, for example

+ (addition), - (subtraction), * (multiplication), and / (division). These are standard mathematical operations that can be applied to numeric data types, the results of such operations being assigned to a variable. EXAMPLE: total = num1 + num2

variables in python...

CODING TIP

Blah, Blah, Blah

did you know?

Blah Blah Blah

Variables
Operators

STARTER

white_rook.png
black_queen.png

Below are images that can be used in a chess game. The images act as variables, what variable names would be considered sensible for the images outlined below?

white_pawn.png
white_queen.png
white_knight.png
black_rook.png
black_king.png
white_bishop.png
black_bishop.png
white_king.png
black_pawn.png
black_knight.png
bottom of page