返回卡包市场

Programming (PAPER 2)

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 24内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (24 张)

#1
正面 (问题)

What are the five main data types - What are the characteristics of each

背面 (解答)

Integer - Whole Numbers Float / Real - Numbers with decimals Boolean - One of two values, usually True or False Character - A single letter, number or symbol String - Used to represent text, is a collection of characters

#2
正面 (问题)

How much memory is used for each main data type

背面 (解答)

Integer - 2 or 4 bytes Float / Real - 4 or 8 bytes Boolean - 1 bit needed but 1 byte is usually used Character - 1 byte String - 1 byte for every character in the string

#3
正面 (问题)

What are the benefits of using the correct data type (3)

背面 (解答)

more memory efficient, robust, predictable

#4
正面 (问题)

What is casting - What are the five commands that do this

背面 (解答)

using functions to manually convert between data types - int (), real (), float (), bool (), str ()

#5
正面 (问题)

What function finds the ASCII number of characters (and vice versa)

背面 (解答)

ASC (), CHR ()

#6
正面 (问题)

What are the 7 basic arithmetic operators (programming) - What are the operators used for each

背面 (解答)

Addition, Subtraction, Division, Multiplication, Exponentiation, Quotient, Modulus > +, -, /, *, ^ or **, DIV, MOD or %

#7
正面 (问题)

What is the quotient - What is the Modulus

背面 (解答)

the whole number value after diving a number e.g. 20 DIV 3 = 6 - the remainder e.g. 20 MOD 3 = 2

#8
正面 (问题)

What two data types do Basic Arithmetic Operators work with

背面 (解答)

real or integer (or both)

#9
正面 (问题)

What is the assignment operator - What does it assign

背面 (解答)

= • values to constants or variables

#10
正面 (问题)

What do comparison operators do

背面 (解答)

compare the value on the left to that on their right and produce a True / False value (Boolean)

#11
正面 (问题)

What are the 6 comparison operators - What do they mean

背面 (解答)

== is equal to <> or != is not equal to < is less than > is greater than <= is less than / equal to >= is more than / equal to

#12
正面 (问题)

How can data values be stored

背面 (解答)

as constants or variables

#13
正面 (问题)

Where is the name of a constant or variable linked to - What does the size of this depend on

背面 (解答)

A memory location - the data type

#14
正面 (问题)

What is a constant

背面 (解答)

a value which has been assigned at design time and can’t be changed

#15
正面 (问题)

What is a variable

背面 (解答)

can change value at any time

#16
正面 (问题)

What are the standard naming conventions that programmers follow when naming constants and variables (2)

背面 (解答)

lower case first letter no spaces

#17
正面 (问题)

How are strings written - What is the name for merging strings - Which operator is this done with

背面 (解答)

• double quotes, but occasionally single quotes • concatenation • • operator

#18
正面 (问题)

How are the characters in a string usually numbered

背面 (解答)

starting from 0

#19
正面 (问题)

What are the 6 common string manipulations - What do each of them do - What are these special functions known as

背面 (解答)

x.upper, x.lower, x.length, x.left(i), x.right(i), x.substring(a, b) - Changes all characters in string x to upper case, changes to lower case, returns number of characters in string x, Extracts first i characters from string x, Extracts last i letters, Extracts a string starting at position a with length b form a • methods

#20
正面 (问题)

What are substring, left and right methods also examples of

背面 (解答)

slicing - part of a string is extracted and returned as a new string

#21
正面 (问题)

What does an IF statement allow for

背面 (解答)

allows you to check if a condition is true or false, and carry out different actions depending on the outcome

#22
正面 (问题)

What is the usual structure for an IF statement

背面 (解答)

IF-THEN-ELSE

#23
正面 (问题)

What is a nested If statement - What do these allow you to do

背面 (解答)

an IF statement inside another one - check more conditions once established that the previous one is true

#24
正面 (问题)

What is the difference between IF-ELSEIF and nested IF statements

背面 (解答)

IF-ELSEIF statements only check more conditions if the previous condition is false