Term 3 Flashcards

1
Q

What is a UI element

A

A UI element is an on-screen object e.g. buttons, images, labels, screens. Also known as widgets.

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

What is a User Interface (UI)?

A

A user interface is the layout/ visual elements of a program which the user interacts with.

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

What is an event?

A

An action that causes something to happen. e.g. a click

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

What is the event listener block of the code?

A

OnEvent block

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

What is an example of a callback function in code?

A

A click of a button changes the screen.

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

What is an event handling/ event handler?

A

A code segment (blocks of code)

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

What is a suitable ID for a pink button?

A

pinkBtn

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

What is a syntax error?

A

A syntax error is a spelling mistake within the program.

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

Give 2 examples of a syntax error

A
  1. A missing semicolon or bracket at the end of a line

2. Referring to an ID called “horseBtn” but you misspell it as “hoseBtn”

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

What is a logic error?

A

A logic error is when the program runs but it doesn’t do what you think it should.

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

Give 2 examples of a logic error

A
  1. Assigning a value to the wrong variable

2. “2+3” instead of 2+3

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

What is a global variable?

A

A variable that can be used through the whole program as it has been declared outside of the function.

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

Give an example of when a global variable would be used

A

When the coder wants to use the variable in more than one function. e.g. The coder would declare the variable such as “var count= 0” at the start of the code instead of in each function.

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

What is a local variable?

A

A local variable is a variable that is declared within one function and can only be used in the function of code.

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

What is a variable?

A

A variable is a lable for a peice of information used in the program.

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

What is an event- driven program?

A

A program designed to run blocks of code or functions in response to specified events.