Programming techniques (unit 11) (not finished) Flashcards

1
Q

(11.1)What is an IDE?

A

Integrated Development Environment) is software which enables you to enter, edit, compile (or interpret) and run your programs

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

(11.1)What features does an IDE have?

A

Clear, visible line numbers
Automatically indent code
Auto-complete commands
Comment or un-comment a section of code

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

(11.1)What is a syntax errror?

A

an error in how the code is written, one of the rules is broken

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

(11.1)What is a type error

A

An error in the expected type of data that is inputted, for example a word when it should be a number

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

(11.1)What IDE tools help a programmer to write their code?

A

Auto-complete code when typing can avoid spelling mistakes
Code Colour highlighting - Can identify command words
Code comments and annotations
Multiple tabs
Import libraries

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

(11.1)What IDE tools help a programmer to fix their code?

A

Stepping - Run one line at a time and check output slowly
Breakpoints - Stop the code at set points to check value of variable(s)
Variable watch window - Check variables values and how they change
Error reporting - report errors locations / give detail on errors
Crash dump , showing the state of variables at crash point
Line numbers to help find errors.

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

(11.1)What is an algorithm?

A

An algorithm is a sequence of instructions that can be followed to solve a problem

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

(11.1)What is pseudocode?

A

Pseudocode is used to write instructions in statements that are somewhere between English and a programming language

halfway language with no strict rules

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

(11.1)What is an identifier

A

A name that points to a memory location

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

(11.1)What is assignment?

A

assigning a value to the memory location

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

(11.1)can the value of a variable be changed while the program is running?

A

Yes

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

(11.1)Can the value of a constant be changed while the program is running?

A

No, it has be be changed in the source code and then recompiled

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

(11.1)what is the use of a constant

A

to reduce the risk of errors by reducing the access to the memory location

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

(11.2) How are IF, ELIF and ELSE conditional statements used in code?

A

allow the code to not always be top to bottom, as the conditions may make it move past a certain function or to another function

Conditional statements based on a given true or false statement

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

What are relational/ comparison operators and what are some examples(11.2)

A

Compare 2 values/ variables

> 	greater than	
< 	less than
=> 	greater than or equal to
=< 	less than or equal to
== 	equal to	(= in some languages)
!= 	not equal to 	(<> in some languages)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

(11.2) What are the 3 main logic gates?

A

AND
OR
NOT

17
Q

(11.2) What does Nested if mean?

A

that the second condition (if) is only checked if the first condition is true

18
Q

(11.3) What 3 features must a programming language have to be a true programming language?

A

Sequence
Selection
Iteration

19
Q

(11.3) What is iteration?

A

iteration means repetition or loop

20
Q

(11.3) What types of loop are there?

A

while loop
do until loop
infinite loop
for loop

21
Q

(11.3) How does a while loop work

A

Using a while loop, the condition is tested upon entry to the loop

22
Q

(11.3) How does a do until loop work?

A

In a do until loop the statements in the loop are executed before the condition is evaluated

23
Q

(11.3) How does an infinite loop occur?

A

You may cause an infinite loop if you make a coding error

However, they can also be purposeful such as in 2D games

24
Q

(11.3) How does a for loop work

A

The for loop is sometimes called a count controlled loop and is used to repeat a some lines of code a specified number of times

25
Q

(11.4) what is a function?

A

a subroutine that returns a value