Arithmetic & Variables Flashcards

1
Q

What is the computers response to the code called?

A

Output

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

The code inside the box is called what?

A

Code cell

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

What symbol is used to write an exponent?

A

**

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

What are comments used for?

A

To annotate what the code is doing

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

What do variables need to start with?

A

Letter or underscore

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

Can variables have spaces?

A

No

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

Variables can only contain what?

A

Letter, underscore & numbers

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

How would you check to see what has been assigned to a variable?

A

Print()

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

What should you use to save a result and work with it later?

A

Variable

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

What is this called ‘=‘

A

Assignment operator

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

A Python function that displays the value passed to it on the screen

A

Print

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

What do comments begin with?

A

#

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

The colon at the end of the if indicates what?

A

A new code block

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

What does this operator do? //

A

Rounds down to the next integer

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

What does abs return?

A

The absolute value of an argument

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

What does % mean

A

Modulus = the integer remaining after division