Programming Flashcards

(39 cards)

1
Q

What are the five data types

A

Integer, real/float, string, character and Boolean

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

What is integer

A

Integer is a whole number

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

What is a real/float?

A

A real is a decimal number

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

What is character?

A

A character is a single letter or number

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

What is a string?

A

A piece of text

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

What is a Boolean?

A

TRUE or FALSE

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

What is a sequence?

A

This is a set of instructions that follow on one from another

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

What is a selection ?

A

A decision within a computer program when the program decides to move on based on the results of an event.

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

What is iteration?

A

The repetition of a block of statements within a computer program.

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

What is a variable ?

A

Data that changes

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

What is a constant ?

A

Data that remains the same

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

What is an array?

A

One method of storing data in an organised structure

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

What is a constant declaration ?

A

A value that increases or decreases at a constant rate each time

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

What is an assignment?

A

The instruction that is carried out in order to get the variable value

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

Python examples of input ?

A

Text, click button

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

Python examples of output?

17
Q

Python example of reading from a file ?

A

Asking the program to select and output an output from the list

18
Q

Python example of writing to a file ?

A

Editing the file like adding items or removing items

19
Q

What are some types of low level languages?

A

Machine language, assembly language and mnemonics

20
Q

What are some types of high level language?

A

Source / machine code

21
Q

What is the job of interpreter ?

A

It turns high level language into low level language, assembly language and Binary language

22
Q

What is the job of compiler?

A

It turns high level language into lower level language

23
Q

What is the job of assembler?

A

It turns computer instructions into binary

24
Q

What is an identifier ?

A

A name given to a part of a program, such as a variable, constant, function, procedure or module.

25
What is concatenation?
The joining together of two or more strings or substrings
26
What is string handling ?
A string is a variable that holds a sequence of one or more alphanumeric characters. These characters can be letters, numbers or symbols. It is usually possible to manipulate a string to provide information or to alter the contents of a string.
27
What are the examples of string handling?
Length, position, substring, concatenation, string conversion, character set conversion
28
What is a length?
The length of a string can be determined using the pseudocode LEN. This gives the length as an integer. LEN(wordOne) - would give the answer "eight", as there are eight characters in the word "Computer"
29
What is positions?
It is possible to determine which character features at a position within a string: wordOne[2] - would give the answer "m", as m is the third character in the word “Computer” (remember computers start counting at zero).
30
What is substring?
A substring is a string of characters that exists inside a string, for example, the first three characters of a password.
31
What is string conversion?
Sometimes a programmer needs to change the data type stored within a variable. For example, an integer may need to be converted to a string in order to be displayed as part of a message. This process is known as casting. The following examples convert a string to an integer and an integer to a string using Python: str(68) returns “68” int(“54”) returns 54
32
What is character set conversions?
Another way of dealing with data is to convert alphanumeric data into its numerical format in a character set. The pseudo-code CHAR_TO_CODE and CODE_TO_CHAR functions allow characters to be swapped between their text and number formats using the ASCII or UNICODE character set.
33
What is subroutine?
Portion of code that may be called to execute anywhere in a program.
34
What is parameters ?
a parameter is a value that is passed into a function or procedure.
35
What three areas should designing robust programs encompass?
- protection against unexpected user inputs or actions, such as a user entering a letter where a number was expected - confirming that users on a computer system are who they say they are - minimising or removing bugs
36
What is validation ?
Checking input data is sensible and in the right format.
37
What is authentication ?
Verifying the identity of a user.
38
What is testing ?
An important part of computer programming which involves checking a program for errors.
39
What is a test data?
Data input when testing to see if the program produces the expected results.