U1T1 - Programming Flashcards Preview

CCEA AS Digital Technology > U1T1 - Programming > Flashcards

Flashcards in U1T1 - Programming Deck (49)
Loading flashcards...
1

What is a computer program?

A specific set of ordered
instructions to be performed by a computer.
The program represents a solution to a problem.

2

What does a computer require to function?

Programs.

3

Where are program instructions executed?

In the CPU.

4

What is an IDE?

Integrated Development Environment. Combines a text editor with program-running functionality. Often includes features like debugging and text completion.

5

What is debugging?

Detecting, locating and correcting bugs (mistakes)., usually by running program. Run program using test data to fully test every part of program.

6

What is a bug?

Logic errors such as telling computer to repeat an operation but not how to stop repeating.

7

What is text completion?

Like predicted tense on phones. A.K.A. Intellisense.

8

Why do we need the translation process?

Computer system only understands machine code. i.e. program in python can't be run directly, it must be translated. Source code is translated. It becomes object code which is understood.

9

What does the translator in the translation process do?

Checks program syntax, giving diagnostics. Translates program into object code.

10

What are diagnostics?

Syntax-error messages.

11

What are the 3 main types of translators?

Assemblers, Compilers and Interpreters.

12

What is an assembler?

Converts assembly language mnemonics into machine code.

13

What does an interpreter do?

Converts each instruction of source code into object code as program is run. Better interactive environment, but slower. Program is translated each time it's executed.

14

What does a compiler do?

Converts entire source code into machine code so it can be run without further translation. Error correction is tedious.

15

What are the 3 main errors in programming?

Syntax, runtime and logical.

16

What is a syntax error?

Code doesn't follow rules of programming language. e.g. Missed bracket, no speech marks, spelling error.

17

What is a runtime error?

When program runs, error occur. e.g. trying to divide a number by o or open a nonexistent file.

18

What is a logical error?

Program runs but gives unexpected results. e.g. mathematical operators used incorrectly < rather than >, no brackets around a calculation.

19

What is an algorithm?

A recipe that describes the exact steps needed for the computer to solve a problem or reach a goal.

20

What is pseudocode?

A set of specific instructions which are very similar to computer code, but not specific to any one computer. Must write start and end.

21

What is a flowchart used for?

Clearly identify steps in a process that is to be programmed.

22

What is syntax?

Set of rules on how to use and organise statements in a programming language.

23

What are the commands used to do these functions in python?:
Multiplication
Remainder
Exponent
Whole Number Division

*
%
**
//

24

What is the order of operation in programming?

BIDMAS - Brackets, Indices, Division, Multiplication, Addition, Subtraction.

25

What are variables?

Reserved memory locations to store values.

26

What happens when you create a variable?

You reserve some space in memory.

27

Where must the data used in a program be stored whilst it's running?

In main memory.

28

What do we use for variables so we can refer to them in memory?

Names

29

What does the name of a variable refer to?
What does each variable have and what does this determine?
What is necessary when we assign a value to a variable?

Location of data item in memory.
Data type, what we can do with the data + how much space it takes up in memory.
Variable name must be created before value is assigned.

30

Why is it important to choose the correct data type in programming?

It determines what actions we can perform on the data. e.g. Can't add a text string by an integer.