Performing Calculations Flashcards

1
Q

A programmer’s tools for performing calculations

A

Math operators

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

Performs a calculation and gives a value

A

Math expression

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

The values on the right and left of the + operator

A

Operands

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

Operator that performs floating-point division

A

/

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

Operator that performs integer division

A

//

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

When two operators share an operant, the operator with the higher ___ is applied first.

A

Precedence

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

Adds two numbers

A

+

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

Subtracts one number from another

A

-

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

Multiplies one number by another

A

*

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

Divides one number by another and gives the remainder

A

%

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

Raises a number to a power

A

**

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

What is the end value of the following expression?

5 + 2 * 3

A

13

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

What is the end value of the following expression?

10 / 2 - 3

A

2

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

What is the end value of the following expression?

8 + 12 * 2 - 4

A

28

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

What is the end value of the following expression?

6 - 3 * 2 + 7 - 1

A

6

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

An expression that uses operands of different data types

A

Mixed-type expressions

17
Q

Python allows you to break a statement into multiple lines by using the _____

A

Line continuation character