coding Flashcards

1
Q

formal parameters

A

parameters within the brackets when first declaring a function/ procedure which hold the values that are later passed in

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

actual parameters

A

variables being passed into the function/ procedure when its called

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

global variables

A

have global scope and are accessible throughout whole program after declaration which is outside all functions

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

local variables

A

have local scope and are accessible only within the block of code where they were declared, like within a specific function or loop

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

disadvantage of global variables

A

overuse can lead to code that is error-prone and difficult to manage, especially when working with a team

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

advantage of local variables

A

prevents mistakes and ensures computer doesn’t use more memory than it needs to

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

function that converts character to ASCII code

A

ord

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

function that converts ASCII code to character

A

chr

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

modulus symbol and what it does

A

%

prints remainder

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

syntax errors

A

mistake in spelling or grammar of code

prevent translation of source code into machine code

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

logic errors

A

mistake in way code is supposed to work

code runs but gives wrong results

can find by doing dry runs or using trace tables

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

execution errors

A

mistakes that show while program running

code asking to do something impossible or wrong

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

dry runs

A

manually working through algorithm with chosen sample data and recording values of variables in trace tables

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

trace tables

A

systematic method that documents values of variables at each step in a programs execution

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

breakpoints

A

stop point in code that tells debugger to pause execution

lets you inspect whats going on at that moment

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

watchpoints

A

watches for changes in certain variables

used alongside breakpoints

this lets you track how specific variables change without stopping program each step