Programming Flashcards

1
Q

What is the difference between high level code and machine code?

A
machine code is a stream of binary bit patterns that represent instructions, these are decoded and executed on. It is processor specific and designed with hardware in mind
high level (python) can be written by users in familiar language and works on different devices, they are translated into machine code to be executed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the need for translators?

A

to convert high level into machine code

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

What are the characteristics of an assembler?

A

converts assembly language into machine code

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

What are the characteristics of a compiler?

A

converts high level into machine code

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

What are the characteristics of an interpreter?

A

converts high level into machine code

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

What are common tools and facilities available in an IDE?

A

editors, error diagnostics, run-time environment, translators, auto-documentation

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

What is a sequence in an algorithm?

A

the steps the program runs through

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

What is a selection in an algorithm?

A

if, then, else, case

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

What is an iteration in an algorithm?

A

for, while, repeat

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

What is the term variable and constant as used in an imperative language?

A

Constants are values that remain the same as the program runs, the constant identify/name is used instead of the value
Variables have an identifier/name to that corresponds to a value that can change

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

What is the integer data type?

A

a whole number

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

What is the real data type?

A

numbers with decimals or fractional part

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

What is the Boolean data type?

A

TRUE/FALSE

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

What is the character data type?

A

single alphanumerical character (not used in calculations)

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

What is the string data type?

A

any number of characters in a row

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

What is an array?

A

A set of variables with the same name and an index number to identify the different variables
e.g. under variable name, there would be an index so name 1 could be Harry, name 2 John all with the variable name

17
Q

What is the difference between a compiler and an interpreter?

A

Interpreter translates and executes one line at a time not whole program, has a slower run time, used in development, in distribute software users can see actual code