Back to marketplace

paper 2 - section 5 - 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)

name 5 different data types

Back (Answer)

• integer • real (or float) • boolean • character • string

#2
Front (Question)

what is the pseudocode for an integer?

Back (Answer)

int

#3
Front (Question)

what is the pseudocode for a real (or float)?

Back (Answer)

real

#4
Front (Question)

what is the pseudocode for boolean?

Back (Answer)

bool

#5
Front (Question)

what is the pseudocode for character

Back (Answer)

char

#6
Front (Question)

what is the pseudocode for a string?

Back (Answer)

string

#7
Front (Question)

what type of data do integers hold?

Back (Answer)

whole numbers only

#8
Front (Question)

what type of data do reals (or floats) hold?

Back (Answer)

numbers that have a decimal part

#9
Front (Question)

what are the characteristics of boolean data types?

Back (Answer)

they can take one of two values, usually true or false

#10
Front (Question)

what type of data does the character data type hold?

Back (Answer)

a single letter, number or symbol

#11
Front (Question)

what type of data do strings hold?

Back (Answer)

a collection of characters - strings are used to represent text

#12
Front (Question)

what are the benefits of using the correct data types?

Back (Answer)

using the correct data types makes code more memory efficient, robust and predictable

#13
Front (Question)

Each data type is allocated a different amount of memory. how much is the typical amount of memory taken up for an integer?

Back (Answer)

2 bytes or 4 bytes

#14
Front (Question)

Each data type is allocated a different amount of memory. What is the typical amount of memory taken up by a real (or a float)?

Back (Answer)

4 bytes or 8 bytes

#15
Front (Question)

Each data type is allocated a different amount of memory. What is the typical amount of memory taken up by a boolean value?

Back (Answer)

1 bit is needed but 1 byte is usually used

#16
Front (Question)

Each data type is allocated a different amount of memory. What is the typical amount of memory taken up by a character?

Back (Answer)

1 byte

#17
Front (Question)

Each data type is allocated a different amount of memory. What is the typical amount of memory taken up by a string?

Back (Answer)

1 byte for every character in the string

#18
Front (Question)

what is the difference between weakly typed and strongly typed languages?

Back (Answer)

weakly types languages will try to convert data types to avoid errors, however this can lead to unpredictable results. Strongly typed languages won’t try to convert data types and so will produce more errors but more predictable results.

#19
Front (Question)

what is casting used for?

Back (Answer)

it’s used to change the data type

#20
Front (Question)

programming languages have functions that let you manually convert between data types. What is this known as?

Back (Answer)

casting

#21
Front (Question)

name 4 commands that can be used in casting

Back (Answer)

• int() • float() • bool() • str()

#22
Front (Question)

what does the function ASC( ) do?

Back (Answer)

allow you to find the ASCII number of characters (e.g. ASC(“b”) would convert the character “b” into its ASCII number 98)

#23
Front (Question)

what does the function CHR( ) do?

Back (Answer)

it allows you to convert an ASCII number into a letter (e.g. CHR(98) would convert the ASCII number 98 into its equivalent character “b”)

#24
Front (Question)

what do the arithmetic operators do?

Back (Answer)

they take two values and perform a maths function on them