2. Assignment

Python - Pseudocode equivalents

Python

Pseudocode

=


2.1. Assignment

Assignment is an instruction that assigns a value to a variable.
num = 7
Pseudocode. Assignment uses a left pointing arrow in pseudocode.
The equivalent pseudocode is:
num ← 7

Tasks

  1. Write pseudocode for the python assignment: year = 2022.

  2. Write pseudocode for the python assignment: name = "Sylvia".

Write pseudocode for the python assignment: year = 2022.

year ← 2022

Write pseudocode for the python assignment: name = "Sylvia".

name ← "Sylvia"

Tasks

  1. Write python for the pseudocode: age 14.

  2. Write python for the pseudocode: game "table tennis".

Write python for the pseudocode: age 14.

age = 14

Write python for this pseudocode: game "table tennis".

game = "table tennis"