Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add two numbers in Sass.
SASS
$sum: 5 [1] 3;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
- instead of + will subtract instead of add.Using
* or / will multiply or divide, not add.✗ Incorrect
The + operator adds two numbers in Sass.
2fill in blank
mediumComplete the code to multiply two numbers in Sass.
SASS
$product: 4 [1] 6;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
+ will add instead of multiply.Using
/ will divide instead of multiply.✗ Incorrect
The * operator multiplies two numbers in Sass.
3fill in blank
hardFix the error in the code to subtract numbers correctly in Sass.
SASS
$difference: 10 [1] 4;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
+ will add instead of subtract.Using
* or / will multiply or divide instead of subtract.✗ Incorrect
The - operator subtracts numbers in Sass.
4fill in blank
hardFill both blanks to calculate the remainder of division in Sass.
SASS
$remainder: 17 [1] 5 [2] 2;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
- instead of % will subtract, not find remainder.Using
* instead of + will multiply instead of add.✗ Incorrect
The % operator finds the remainder. Then + adds 2 to it.
5fill in blank
hardFill all three blanks to create a complex calculation in Sass.
SASS
$result: (8 [1] 2) [2] 3 [3] 4;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up operators order changes the result.
Using multiplication instead of remainder changes meaning.
✗ Incorrect
First, find remainder of 8 % 2, then add 3, then subtract 4.