Back to marketplace

2.2 - Programming fundamentals

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

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

Card preview (20)

#1
Front (Question)

What does + do?

Back (Answer)

Adds two variables

#2
Front (Question)

What does - do?

Back (Answer)

Subtracts two variables

#3
Front (Question)

What does * do?

Back (Answer)

Multiplies 2 variables

#4
Front (Question)

What does / do?

Back (Answer)

Divides 2 variables

#5
Front (Question)

What does % (MOD) do?

Back (Answer)

Outputs the remainder of the division

#6
Front (Question)

What does // (DIV) do?

Back (Answer)

Divides 2 variables but only shows the integer value (integer division)

#7
Front (Question)

What does == do?

Back (Answer)

Shows 2 strings are equal to each other

#8
Front (Question)

What does != do?

Back (Answer)

Shows 2 strings are not equal to each other

#9
Front (Question)

The 3 basic programming constructs

Back (Answer)

• Selection - the path a program takes when running based on a decision • Sequence - executing one instruction after the other • Iteration - the repeated execution of a section of code

#10
Front (Question)

What is a variable

Back (Answer)

A named memory location which stores a value that may change during the execution of the program

#11
Front (Question)

What is a constant

Back (Answer)

A value that cannot change when the program is run and is assigned when the program is made

#12
Front (Question)

What is assignment

Back (Answer)

Giving a variable or constant a value. This is done by an “=” sign

#13
Front (Question)

What is an identifier and rules that an identifier must follow

Back (Answer)

• The name of the variable • It must start with a letter • Cannot contain special characters • Cannot have spaces • NAme should be meaningful

#14
Front (Question)

Advantages of constants

Back (Answer)

• Make a program easier to read as they are declared at the start • Can be changed in one single place instead of changing in multiple places meaning errors are reduced • Compiler can optimise the code meaning it can be run more quickly when using constants

#15
Front (Question)

What is a case statement

Back (Answer)

• Where a program can branch off in several different paths depending on the value of a variable

#16
Front (Question)

Two forms of iteration and when are they needed The 3 types of statements fall into these 2 categories

Back (Answer)

• Count controlled loop (for loop) - when the number of iterations is known ahead of time • Condition controlled loop (do…until and while loops) - used when the number of iterations is notknown as the variable controlling the iteration changes within the loop itself

#17
Front (Question)

Difference between a do…until loop and a while loop

Back (Answer)

• While - Condition is checked AT THE TOP. In a while loop, if the condition is met before the loop, the while loop will never run • Do…until - the code will execute AT LEAST ONCE as the exit condition is checked AT THE END.

#18
Front (Question)

What coomand must be used to stop a while loop

Back (Answer)

• BREAK in python • ENDWHILE in exam question langauge

#19
Front (Question)

What is nesting, why is it needed and different types of it

Back (Answer)

• Including one program construct within another e.g. loop in a loop reducing the amount of code needed making it easier to edit and debug • Nested selection - increases the number of paths at a decision point • Nested iteration

#20
Front (Question)

What is casting and why is it needed

Back (Answer)

• Changing a data type of a variable from one type to another • It allows numbers to be manipulated as strings can be