Back to marketplace

1.2.3 Introduction to Programming

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What is the pseudocode for a WHILE loop?

Back (Answer)

while condition code to execute endwhile ———–EXAMPLE————– while answer!=”computer” answer=input(“What is the password?”) endwhile

#2
Front (Question)

What is the pseudocode for a DO WHILE/UNTIL loop?

Back (Answer)

do code to execute until condition ———–EXAMPLE————– do answer=input(“What is the password?”) until answer==”computer”

#3
Front (Question)

What is the pseudocode for a FOR loop?

Back (Answer)

for i=x to y code to execute next i ———–EXAMPLE————– for i=0 to 7 print(“Hello”) next i

#4
Front (Question)

State the 7 arithmetic operators

Back (Answer)

Add (+) Subtract (-) Multiply (*) Divide (/) MOD (Remainder) DIV (Whole part of division) ^ (Power)

#5
Front (Question)

State the 6 comparison operators

Back (Answer)

Equal to == Not equal to != Less than < Less than or equal to <= Greater than > Greater than or equal to >=

#6
Front (Question)

What is the pseudocode to output?

Back (Answer)

print(“hello world”)

#7
Front (Question)

What is the pseudocode to take an input?

Back (Answer)

VariableName=input(“Please enter your name”) Don’t forget to use casting if anything other than a string is required

#8
Front (Question)

What is the pseudocode for a substring?

Back (Answer)

stringname.subString(startingPosition, numberOfCharactersToReturn)

#9
Front (Question)

What is the pseudocode for an IF statement?

Back (Answer)

if condition then code to execute elseif condition then code to execute else code to execute endif ———–EXAMPLE————– if entry==”a” then print(“You selected A”) elseif entry==”b” then print(“You selected B”) else print(“Unrecognised selection”) endif

#10
Front (Question)

What is the pseudocode for a CASE/SWITCH statement?

Back (Answer)

switch entry: case “A”: print(“You selected A”) case “B”: print(“You selected B”) default: print(“Unrecognised selection”) endswitch

#11
Front (Question)

What is the pseudocode for a function?

Back (Answer)

function triple(number) return number*3 endfunction will always have the keyword return

#12
Front (Question)

What is the pseudocode for a procedure?

Back (Answer)

procedure greeting(name) print(“hello”+name) endprocedure

#13
Front (Question)

What is the pseudocode for reading the contents of a file?

Back (Answer)

myFile = openRead(“sample.txt”) while NOT myFile.endOfFile() print(myFile.readLine()) endwhile myFile.close()

#14
Front (Question)

What is the pseudocode for writing to a file?

Back (Answer)

myFile = openWrite(“sample.txt”) myFile.writeLine(“Hello World”) myFile.close()

#15
Front (Question)

What is the pseudocode to declare, populate, and print a two-item 1D array?

Back (Answer)

array names[2] names[0]=”Ahmad” names[1]=”Ben” print(names[1])

#16
Front (Question)

What is the pseudocode to declare a 2D array and access the first element?

Back (Answer)

Array board[8,8] board[0,0]=”rook”

#17
Front (Question)

What is the pseudocode to declare a 3D array and access the first element?

Back (Answer)

Array board[8,8,8] board[0,0,0]=”rook”

#18
Front (Question)

List the 11 mnemonics used in LMC

Back (Answer)

ADD SUB STA LDA BRA BRP BRZ INP OUT HLT DAT

#19
Front (Question)

Write the LMC code to take two inputs and output the biggest of them.

Back (Answer)

Card back image
#20
Front (Question)

What is the pseudocode to output the length of a string?

Back (Answer)

stringname.length

#21
Front (Question)

What is the pseudocode to get a set number of characters from the left or right hand side of a string?

Back (Answer)

stringname.left(numberOfCharacters) stringname.right(numberOfCharacters)

#22
Front (Question)

What is the pseudocode to convert a string to and from upper case?

Back (Answer)

stringname.upper stringname.lower

#23
Front (Question)

How do you convert a character to its ASCII value?

Back (Answer)

ASC(‘A’) Returns 65 as the ASCII value

#24
Front (Question)

How do you convert a character from its ASCII value?

Back (Answer)

CHR(65) Returns ‘A’