Variables/Constants Flashcards

1
Q

How many kinds of variables are there?

A

6 kinds

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

What kinds of variables are there?

A

Integer, Float, Char, String, Boolean, Null

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

What is a variable?

A

A “container” for a certain value

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

What is the difference between variables and Constants?

A

Constants cannot change during the program, variables can

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

What is an identifier?

A

The unique string of characters used by the programmer to identify and call on the value

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

How do you pick the identifier for a variable or constant?

A

Based on what it is storing to allow for easy location.

ex. Storing the total score from a match as “scoreT”

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

Do all programming languages have Constants?

A

No. Python is an example of a programming language without Constants

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

How are Constants normally written?

A

In all caps

ex. SPEED

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

Can variables be set to other variables?

A

Yes, a variable can be set to other variables or operations of other variables.

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

What does a dynamically typed language do for variables?

A

You do not have to specify how the variable is stored.

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