Programming : Unit 5-11 Flashcards

1
Q

What is execution?

A
  • the process by which a computer carries out the instructions of a computer program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 5 data types?

A
  • Integer.
  • Real or float.
  • Boolean
    -Character
  • string
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Integer?
Real or float?
Boolean?
Character?
String?

A

Integer: used to store whole numbers without a fractional part.
Real/float: Used to store numbers with a fractional part.
Boolean: has two possible values: True or false.
Character: a letter, a symbol, a number or a space.
String: A set of characters which can include spaces and numbers they are treated as texts not numbers.

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

What is initialize?

A
  • to set variables to their starting values at the beginning of a program or sub program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is initialization?

A
  • the process of assigning an initial value to a variable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is type coercion?

A
  • the process of converting the value stored in a variable from one data type to another.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 2 types of operators?

A
  • relational operator.
  • logical operator.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the relational operator?
logical operator?

A
  • A relational operator is an operator that tests the relationship between two entities.
  • A logical operator is a Boolean operator using AND, OR and NOT.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 6 relational operators?

A

Equal to , greater than, greater than or equal to, less than, less than or equal to, not equal to.

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

What are the 3 logical operators?

A
  • and/ or/ not.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 2 types of iteration?

A
  • indefinite iteration.
  • definite iteration.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a block of code?

A
  • a grouping of two or more code statements.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the use of each technique?
a. comments.
b. descriptive names.
c. Indentation.
d. white space.

A
  • comments should be used to explain what each part of the program does.
  • using descriptive identifiers for variables, constants, and subprograms helps make their purpose clear.
  • indentation. makes it easier to see where each block of code starts and finishes.
  • white space. adding blank lines between different blocks of code makes them stand out.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a string?

A
  • a sequence of characters. they can be letters, numbers, symbols, punctuation marks, or space.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a function?

A
  • a subprogram that performs a specific task and returns a value to the main program. (there are built-in functions for use but could make your own)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is string traversal?

A
  • using a loop to cycle through each character in a string.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is concatenation?

A

concatenation involves joining two or more items of information together

18
Q

What is a data structure?-

A

an organized collection of related elements.

19
Q

what are the 2 types of data structure commonly used?

A
  • array.
  • records.
20
Q

What is an array?

A
  • a structure that contains many items of data of the same type. the data is indexed so the item can be easily found.
21
Q

What is an index?

A
  • a number that identifies each element of an array.
22
Q

What are the 2 types of arrays?

A
  • two-dimensional arrays.
  • multi-dimensional arrays.
23
Q

What is a record?

A
  • a data structure that stores a set of related values of different data types.
24
Q

What is a field?

A
  • an individual element in a record.
25
What is validation?
- to check that the data entered by a user or from a file meets specified requirements.
26
What are the 4 different types of validation?
-range check. - presence check. - look-up check. - length check.
27
What are the types of data used to test validation rules of a program.
- normal data. - boundary data. - erroneous data.
28
What is normal data?
- it is the data that is within the limits of what should be accepted by a program.
29
What is boundary data?
- this data is the outer limits of what should be accepted by a computer.
30
What is erroneous data?
- this data should not be accepted by the program.
31
What is a text file?
- a sequence of lines, each of which consists of a sequence of characters.
32
What is a file handle?
- a label that is assigned to a resource needed by the program. It can only access the file through the computer's operating system.
33
What is overwritten?
- if a file exists on the computer and a new file is created with the same name, the new file is kept and the old file is written over and lost
34
What is logic error?
an error in an algorithm that results in incorrect or unexpected behaviour.
35
What is trace table?
a technique used to identify any logic errors in algorithms. Each column represents a variable or output and each row a value of that variable.
36
What are the 3 type of errors?
- Runtime error. - Logic error. -Syntax error.
37
Syntax error?
- occur when the grammer rules of a programming language are not followed. - spelling errors. -missing commas -missing out a closing bracket. - missing out quotation marks.
38
runtime error?
an error that occurs while the program is running- the operation the computer is asked to do is impossible to execute.
39
Logic error?
The program seems to run normally; however, there is an error in the logic of the program means it does not produce the result you expect.
40
What is IDE?
intergrated development environment:- a package that helps programmers to develop program code.
41
What is debugger?
- a computer program that assists in the detection and correction of errors in other computer programs.
42
What are the erros in IDE?
- Indentation error: -Syntax error: - Type error: - Zero Division error: -Name error