Math Expressions: familiar operators Flashcards

1
Q

Enter the operators, in this order, for addition, subtraction, multiplication, and division. Don’t type spaces between them.

A

+-*/

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

What is the name of the arithmetic operator that gives you the remainder when one number is divided by another? (one word)

A

modulus

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

Type the modulus operator.

A

%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
What is the value of num?
var num = 20 % 6;
A

2

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

In a single statement, declare the variable largeNum and assign it the result of 1,000 multiplied by 2,000.

A

var largeNum = 1000 * 2000;

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

Assign to the variable num the result of dividing 9 by the value represented by the variable qty. The variable num hasn’t been declared beforehand.

A

var num = 9 / qty;

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

Assign to a variable the result of adding a number to itself, for example 2 + 2. The variable hasn’t been declared beforehand. Make up the variable name.

A

var doubledNum = 12 + 12;

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

Code an alert that displays the result of any mathematical operation on 2 variables. Make up the variable names.

A

alert(price * qty);

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

Assign to a variable the remainder when one number is divided by another. The variable hasn’t been declared beforehand. Make up the variable name.

A

var leftOver = 10 % 3;

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

Assign to a variable the remainder when the value represented by a variable is divided by a number. The first variable has been declared beforehand. Make up the variable names.

A

leftOver = num % 3;

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