programming languages keywords Flashcards

1
Q

What is sequence ?

A

The order in which code is executed

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

What is selection ?

A

A programming construct where a section of code is only run if a condition is met ie IF statement

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

What is iteration ?

A

The repeating of code a specified number of times or until a condition is met ( a loop)

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

What is a high level language ?

A

A programming language which closely resembles the natural language - the spoken and written language of humans

Examples: Python, Visual basic, Java, C++

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

What is a low level language ?

A

A programming language close to the computer’s own language

Examples: Machine code and assembly language

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

What language can processors execute instructions in ?

A

Machine code

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

Will a program written in machine code for a PC run on an Apple smartphone ?

A

No, because machine code instructions are made specific to a particular processor or group of processors

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

What is assembly language ?

A

It is a low level language which replaces machine code with mnemonics and operands to make it easier to read and write.

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

What is an operand ?

A

a term used to describe any object that is capable of being manipulated.

For example, in “1 + 2” the “1” and “2” are the operands and the plus symbol is the operator.

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

What can assembly language be used ?

A
  • In software that is used in embedded systems such as a washing machine
  • In software used to control specific hardware components like device drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages of a high level language ?

A
  • Easier to learn
  • faster to write
  • easier to understand and debug
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the advantages of a low level language ?

A
  • programs can run very quickly
  • code usually requires less RAM
  • Statements in LLL can be used to control and manipulate specific hardware components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a translator ?

A

Translates from one programming language to another

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

What are the three types of translators ?

A

Interpreter, compiler and assembler

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

What does a compiler do ?

A

Creates an executable file for a program, source code translated all in one go

Translates from a high level language to machine code

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

What does an interpreter do ?

A

Translates and executes code line by line

Translates from a high level language to machine code

17
Q

What does an assembler do ?

A

Assembles the code so that it can be run later

Translates from assembly language to machine code

18
Q

Advantages of a compiler

A
  • Compiled programs run quickly as they have already been translated
  • Can be supplied as an executable file which is preferred by programmers, as an executable file cant easily be modified ( without permission)
  • Compilers optimise code so that it runs quicker and takes up less memory space
19
Q

What does it mean to optimise code ?

A

To make the code for a program more efficient.

A program can be optimised to run quicker or take up less memory.

20
Q

What are the disadvantages of compilers ?

A
  • Source code must be recompiled whenever the programmer changes the program
  • Source code that is compiled on one platform won’t run on another as the machine code is processor specific.
21
Q

What are the advantages of an interpreter ?

A
  • Instructions are executed as soon as they are translated
  • Errors can quickly be spotted ( the user is straight away notified at which part of the program the interpretation has failed)
22
Q

What are the disadvantages of an interpreter ?

A
  • Interpreted programs run slowly as the processor has to wait for each instruction to be translated before it can be executed
  • Program has to be translated every time it is run
  • Interpreters don’t produce an executable file ( so source code has to be supplied and it could be modified without permission)
  • Interpreters don’t optimise code
23
Q

What does a variable do ?

A

Holds a value in a memory location that is needed to carry out your program

Can only hold one value at a time, value can change.

24
Q

What is an array ?

A

A data structure that holds similar related data

25
Q

What is a procedure ?

A

A subprogram that carries out instructions but does not return a value

26
Q

What is a function ?

A

A subprogram that carries out instructions and returns a value

27
Q

What is an IDE and what can they do ?

A

Integrated development environments. Make programming easier

  • automatically indent code
  • highlight important syntax structures
  • Can autocomplete lines of code that are typically used
  • Can point out any syntax errors that you have made
28
Q

What does an IDE allow you to do ?

A

Allows you to write, run and debug code without having to switch programs.

Without an IDE, you would have to write all of your programs in a basic text editor.

You would then need to switch programs to translate the code and test it

29
Q

What is declaration ?

A

To declare a variable as a certain data type ( not used in python)

30
Q

What is initialisation ?

A

To set an initial value for a variable , which can later be changed

31
Q

What is assignment ?

A

To change the value held at the variable location

32
Q

What is naming convention ?

A

The idea that each programming language has their own standard for naming things.