This language-independent planning tool uses everyday English to map out a program before writing actual code
Pseudocode
A named location in the computer's memory that stores a single item of data that can change while the program runs
A variable
This command word is used in pseudocode when data is entered by a user.
INPUT
The programming term for joining two or more strings together to form a single string (like combining "Foot" and "ball")
Concatenation
Debug: Identify the error in this pseudocode assignment statement:
10score <- 50
A variable identifier cannot start with a number
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
The process of storing data inside a variable.
Assignment
This command word is used in pseudocode to display data on the screen
OUTPUT
Debug: Identify the syntax error in this Python print statement: print("Hello World)
Missing closing quotation mark (syntax error)
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).
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
In pseudocode assignment statements, an arrow (<-) or this standard mathematical symbol is commonly used.
An equals sign (=)
In both pseudocode and Python, literal text characters must be enclosed inside these specific punctuation marks.
Double quotation marks (" ")
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
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
Unlike Python, pseudocode does not have strict rules regarding grammar and arrangement, which is known as having no set what?
Syntax
This is the technical term for the unique name given to a variable, which must be one word without spaces.
An identifier
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)
trace this output combining text and a variable: name <- "Arun"
OUTPUT "Hello", name
Hello Arun
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.
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
Python has 31 of these specific reserved words with special functions that cannot be used as variable names.
Reserved keywords
This is the general computer science term for data that the computer sends out to be displayed on a screen
Output
what is in the first?
first <- 20
second <- 40
temp <- first
first <- second
second <- temp
40
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.