Pseudocode Basics
Variables & Assignment
Input & Output
Tracing & Debugging Code
Pseudocode Debugging Challenges
100

This language-independent planning tool uses everyday English to map out a program before writing actual code

 Pseudocode

100

A named location in the computer's memory that stores a single item of data that can change while the program runs

A variable

100

This command word is used in pseudocode when data is entered by a user.

INPUT

100

The programming term for joining two or more strings together to form a single string (like combining "Foot" and "ball")

Concatenation

100

Debug: Identify the error in this pseudocode assignment statement:

10score <- 50


A variable identifier cannot start with a number

200

Python is an example of this type of language because it helps humans communicate easily with computers using readable words.

A high-level programming language

200

The process of storing data inside a variable.

Assignment

200

This command word is used in pseudocode to display data on the screen

OUTPUT

200

Debug: Identify the syntax error in this Python print statement: print("Hello World)

Missing closing quotation mark (syntax error)

200

Explain what is wrong with this output statement:

OUTPUT Hello, name


Missing double quotation marks around the text string "Hello" (without quotes, the computer will look for a variable named Hello).

300

This term means that pseudocode is not tied to a specific language, so any programmer can read it and translate it into Python, C++, or Java

Language independent

300

In pseudocode assignment statements, an arrow (<-) or this standard mathematical symbol is commonly used.  

An equals sign (=)

300

In both pseudocode and Python, literal text characters must be enclosed inside these specific punctuation marks.

Double quotation marks (" ")

300

What are the values stored in variables a and b after running these assignment steps?

a <- 10 

b <- 25 

a <- a + 5 

b <- b - a

a = 15 and b = 10

300

Identify the error in the arrangement of this assignment statement:

total + 10 <- score


 The left-hand side of an assignment operator must be a single variable identifier, not an expression or calculation

400

Unlike Python, pseudocode does not have strict rules regarding grammar and arrangement, which is known as having no set what?

Syntax

400

This is the technical term for the unique name given to a variable, which must be one word without spaces.

An identifier

400

If you forget to put quotation marks around text characters, the program will mistakenly treat them as the name of one of these.

A variable (or identifier)

400

trace this output combining text and a variable: name <- "Arun" 

OUTPUT "Hello", name

Hello Arun

400

Debug: Explain why this pseudocode snippet will cause a rule violation regarding identifiers:

INPUT final score


Variable identifiers must be a single word without spaces.  

500

If pseudocode becomes formalised and a program is written that can read and run it directly, it is no longer pseudocode, but actual what?  

Actual code written in a programming language

500

Python has 31 of these specific reserved words with special functions that cannot be used as variable names.

Reserved keywords

500

This is the general computer science term for data that the computer sends out to be displayed on a screen

 Output

500

what is in  the first?

first <- 20 

second <- 40 

temp <- first 

first <- second 

second <- temp

40

500

Debug: Trace and find the logical or syntax flaw in this sequence intended to calculate an average:

total <- num1 + num2 

average <- total * 2 

OUTPUT average


To find an average of two numbers, total must be divided by 2 (total / 2), not multiplied by 2.   

learner 8.pdf