Focke's Chapter 1 Scripting Flashcards

(10 cards)

1
Q

This is an identifier that holds, in storage, that holds some sort of data

A

variable

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

What are the three “levels” of variables?

A

Local, global, and public

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

What is done to make a variable “local?”

A

Preface with an underscore.

Ex: to make the variable “Dave” local, add _Dave (no quotes)

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

The following variable is which type?

_Dave = 1

A

integer

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

The following variable is which type?

_Dave = “Dave”

A

string

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

The following variable is which type?

_Dave = “M16A1”

A

object from the editor

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

The following variable is which type?

_Dave = [Dave, Eric]

A

array

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

The following variable is which type?

_Dave = True

A

bool

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

How does one add integers to a variable?

A

Assign an integer value to variable, then you can conduct mathematical operations.

Ex: _aiDude = 1
_sum = aiDude + 1
_sum = 3

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

The following is which variable type?

“Dave”

A

a string

A “string” is a set of characters in sequence surrounded by quotes

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