Topic 2 - Programming Flashcards

(32 cards)

1
Q

What is a Data type ?

A

How the data is used and represented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data type examples ?

A

Integer, float, character, float, boolean and string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a definite loop ?

A

For loop - ends at a fixed value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an indefinite loop ?

A

While loop - ends once a condition is met

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Nested loops

A

A loop within a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Selection examples

A

If, elif and else

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do subroutines include ?

A

Procedures and functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does a procedure do ?

A

Once a task has been completed, it may not return a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does a function do ?

A

Once a task is completed, a value will always return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is addition represented in programming?

A

+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is subtraction represented in programming ?

A

-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is division represented in programming ?

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How is integer division represented in programming ?

A

\

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How is a modular represented in programming ?

A

MOD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How is multiplication represented in programming ?

A

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Records

A

Multiple pieces of data belonging to different data types

17
Q

Arrays

A

Like a variable (has a name, data type, etc) but instead can store many pieces of data.

18
Q

Data Validations

A

Process that checks on data

19
Q

What is a presence check?

A

If anything is entered, it is accepted, if nothing is entered then it is invalid.

20
Q

What does a range check handle?

A

Numbers and Dates

21
Q

What does a Type check do?

A

Makes sure the correct data type is used

22
Q

What does a length check do?

A

Checks appropriate number of characters entered for things like usernames and passwords.

23
Q

What is a format check?

A

It is a type check for individual characters. It ensures that characters are in the correct place. An example would be for a national insurance number.

24
Q

What does a look up check do?

A

Makes sure that data that is entered actually exists within a list.

25
What is a string operation?
Name of any process that is performed on a string.
26
What is a sub-string?
Part of a larger string.
27
What is character code?
Upper case letters that have different codes to lower case letters,
28
What is a data structure?
An organised means of storing related data.
29
What can a list do?
Can store multiple pieces of data even though the list has only one name.
30
One dimensional arrays
Each having an index one higher than the index before.
31
Two dimensional arrays
Elements are accessed by using two index numbers .
32
Boolean array
Each element can only hold a single value of True or False.