Part 1 Block 3 - Programmers, programming and programs Flashcards

1
Q

When it comes to translating high-level programming languages like Python into machine language there are two fundamental processes.

C_________________________
I__________________________

A

Compilation
interpretation

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

In compilation, the program written in the high-level language, called the s______ c_______, is used as the input to a translator program called a c_________.

A

source code
compiler

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

The compiler translates the entire source program into the machine language understood by the processor; this translation is referred to as the o_________ c____________.

A

object code

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

The object code is then saved, and it is this machine language program that is loaded into m____________ and executed when the program is executed.

A

memory

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

Compilers have the disadvantage that every change to the s________ c________ requires the code to be re-compiled to generate a new machine language representation.

A

source code

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

In interpretation, an interpreter translates each i___________________ in the source code only when it is required for that instruction to be executed.

A

instruction

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

The advantage of an interpreted language is that the potentially lengthy process of c___________ does not need to be gone through for each small change in the source code.

A

compilation

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

The main disadvantage of an interpreted language is that the translation process must take place every time a program is executed, resulting in a slower execution of the program.

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

The source code of a Python program is first compiled into b______ code. When it is ready to be executed, the byte code is i___________ by the Python virtual machine.

A

byte code
interpreted

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

Virtual machines

Some high-level programming languages such as Python, Java, Ruby, Bash and Perl are compiled, the source code is not translated into the machine code of the processor, but rather into an intermediate stage called b_________.

A

bytecode

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

Interpreting using a virtual machine

If we take Python as an example, the source code (which has an extension of .py) is compiled into bytecode (which has an extension .pyc), which is then loaded into a P_______ v________ m__________ (PVM).

A

python virtual machine

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

Within the virtual machine, a Python i___________ converts the bytecode to the particular flavour of machine code that the hardware processor understands.

A

interpreter

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

The advantages and disadvantages of interpreting using a virtual machine

The main advantage is that bytecode can be run on any computer that has an appropriate v________ m__________ installed, rather than having to be recompiled for each new platform or processor.

A

virtual machine

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

The advantages and disadvantages of interpreting using a virtual machine

Programs that are run in virtual machines are also considered to be more s_______ as the input is code that has already been compiled.

Hence, unlike a traditional compiled or interpreted language, the host operating system is one big step r___________ from the source code, which is where a virus might be introduced.

Virtual machines also have s____________ built in to ensure that they interact only with trusted data files on the host machine.

A

secure
removed
safeguards

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