2.2 - Programming Fundamentals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:05 PM on 5/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

45 Terms

1
New cards

Variable

A value that can change while the program is running

2
New cards

Constant

A value that remains fixed and cannot change while the program is running

3
New cards

Assignment

Where you give/assign a value to a variable or constant using the = symbol

4
New cards

Operator

Used on variables and constants to perform mathematical operations

5
New cards

Casting

Converting a variable form one data type to another

6
New cards

Integer

A whole number

7
New cards

Real

A decimal number

8
New cards

Character

A single alphanumeric character

9
New cards

String

Multiple characters

10
New cards

Boolean

True/False values

11
New cards

Input casting

Can be assigned from a string to a number variable

12
New cards

Output statement

Used to output or print to the screen

13
New cards

Sequencing

Executing one instruction after another

14
New cards

Selection

Branching a program based on a condition (if/else)

15
New cards

Iteration

Looping/repeating sections of code (for/while)

16
New cards

Addition

Adding two values using +

17
New cards

Subtraction

Subtracting two values using -

18
New cards

Multiplication

Multiplying two values using *

19
New cards

Division

Dividing two values using /

20
New cards

Exponential

‘To the power of’ using ^

21
New cards

Modulus

‘How many whole numbers are left over after dividing two numbers’ using MOD eg: 7MOD2 = 1 (3 remainder 1)

22
New cards

Integer division

‘How many times a whole number fits into another number using’ DIV eg: 7DIV2 = 3 (3 remainder 1)

23
New cards

Is equal to

==

24
New cards

Is not equal to

!=

25
New cards

Less than

<

26
New cards

Less than or equal to

<=

27
New cards

Greater than

>

28
New cards

Greater than or equal to

>=

29
New cards

String manipulation

The act of manipulating, extracting or changing characters in a string variable

30
New cards

Length

string.length eg: if string == hello, length == 5

31
New cards

Ustring

string.upper eg: if string == hello, string becomes HELLO

32
New cards

Lstring

string.lower eg: if string == Hello, string becomes hello

33
New cards

Substrings

string.substring(starting position, number of characters)

Eg: if string == buenos dias, string.substring(2,3), prints characters ‘eno’

34
New cards

String shift

Shifting a string left or right eg: string.left(3), shifts characters left by 3 places

35
New cards

ASCII characters in strings

ASC(“A”), returns ASCII value of “A”

CHR(65), returns character with ASCII value of 65

36
New cards

SELECT

Selects field to be returned

37
New cards

FROM

Which table in the database

38
New cards

WHERE

Records meet a condition

39
New cards

Array

A variable which can continue more than one data item eg: a list of names

40
New cards

Index

A way of finding a specific item in an array eg: food[0,0] == “apple”

41
New cards

Subprogram

Program within a program

42
New cards

Procedure

Carry out a task and don’t return values

43
New cards

Functions

Carry out a task and return a value

44
New cards

Advantages of subprograms

  • Easier to write and debug

  • Easier to test and put into the main body

45
New cards

Random number generation

Random(1,6), generates a random number between 1 and 6 inclusive