Programming Paradigms Flashcards

1
Q

What is branching?

A

This is an instruction in a program that can cause a computer to begin executing a different instruction sequence, executing instructions in the order that is right.

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

What is a language-defined data type?

A

Also known as a built-in data type, these are data types that are included with the language that you are using to write code.

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

Alphanumeric Strings?

A

A string that contains both letters and numbers, and sometimes also special characters.

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

Boolean?

A

A result that can only have one of two possible values: true or false.

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

Characters?

A

A unit of information that roughly corresponds to a grapheme, grapheme-like unit, or symbol.

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

Floating Point (Real)?

A

A function or reusable code in the python programming language that converts values into floating point numbers.

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

Integers?

A

A sequence of digits optionally prefixed with + or -. Also only whole numbers.

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

Strings?

A

A string data type used in programming, that is used to represent text rather than numbers.

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

What is a user-defined data type?

A

The opposite of built-in data types is user-defined data types.
Of which these data types have to be defined by the user.

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

Array?

A

A data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key.

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

Objects?

A

An object is a data structure or abstract data type containing fields (state variables containing data) and methods (subroutines or procedures defining the object’s behavior in code).

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

Records?

A

A record is a programmer-defined data type.

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

Sets?

A

A mutable collection of distinct (unique) immutable values that are unordered.

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

Different types of variables?

A
  • Local variables
  • Global variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Difference between variables and constants?

A

A constant is a named data item with a predefined value, while a variable is a named data item whose value can change during program execution.

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

What is a local variable?

A

A local variable is declared within one specific sub-program of a larger main program.

17
Q

What is a global variable?

A

A variable with global scope, meaning that it is visible (hence accessible) throughout the program, unless shadowed.

18
Q

What is an Arithmetic Function?

A

Arithmetic functions deal with numbers. Below are three common arithmetic built-in functions that you will be expected to know for your exam.

19
Q

What is a random number generator?

A

A built-in function, given a minimum and maximum range, it will produce a new random number when the function is called.

20
Q

What are string-handling functions?

A
  • Length ()
  • Position ()
  • Concatenate ()
21
Q

What is a FOR loop?

A

A loop that will run a set amount of times based on the values it is given upon installation.

22
Q

What is a WHILE loop?

A

A loop where the syntax begins with a condition being evaluated which will become the limit of the loops run cycle.

23
Q

What is a REPEAT loop?

A

Also known as the DO UNTIL loop, this iterative technique uses the same structure as a WHILE loop except that the condition is evaluated at the end of the block.

24
Q

What is a BREAK?

A

If using a FOR loop to iterate a process and you are using a conditional statement, then it may also be useful to be able to break the loop if the condition is met.

25
Q

What is a subroutine?

A

These are blocks of code which are independent of anything external to them; they can have their own variables, and they can be passed data using arguments to perform a task or even return a value.

26
Q

What is a function and procedure?

A

Function - A subroutine, separated from the main program, that returns a value.
Procedure - A subroutine, separated from main program that does not return a value.

27
Q

What is a sequence control structure?

A

The order of a set of instructions in the correct order.

28
Q

What is a conditional control structure?

A

Statements such as IF statements, which select a function based on what condition is met.

29
Q

What is an iterative control structure?

A

A statement or block of code that is executed until the program reaches a certain result. Such as LOOPs.

30
Q

What are blocks?

A

Procedure which are discrete blocks of code that carry out a single task.

31
Q

What is a statement?

A

A single instruction that performs a specific and small task.