Variables for Numbers Flashcards

1
Q

There are two correct answers for this one. Answer with either one. What is this?

A

number or integer

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

Type the illegal character in this variable name.

2nd_runner_up

A

2

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

Assign the number 5 to the variable players

A

players = 5

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

Assign the negative number -6 to the variable loss

A

loss = -6

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

What is the value of total?
number = 10
total = number + 2

A

12

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

Assign a number (your choice) to the variable total.

A

total = 15

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

Assign a negative integer to a variable. You choose the integer and the variable name.

A

loss = -1030

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

What is this (one word, lowercase)?

“-8.087”

A

string

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

Add two variables and assign the result to a third variable. Make up all the variable names.

A

total = merch_total + shipping

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

Add 5 to the variable running_total and assign the result to the same variable

A

running_total = running_total + 5

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