0
0
SASSmarkup~10 mins

sass:math module - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to calculate the square root of 16 using sass:math.

SASS
@use "sass:math";

$result: math.[1](16);
Drag options to blanks, or click blank then click option'
Asqrt
Bpow
Cabs
Dround
Attempts:
3 left
💡 Hint
Common Mistakes
Using math.pow instead of math.sqrt for square root.
Trying to use math.abs which returns absolute value, not square root.
2fill in blank
medium

Complete the code to calculate 2 raised to the power of 3 using sass:math.

SASS
@use "sass:math";

$result: math.[1](2, 3);
Drag options to blanks, or click blank then click option'
Asqrt
Blog
Cpow
Dmax
Attempts:
3 left
💡 Hint
Common Mistakes
Using math.sqrt instead of math.pow for exponentiation.
Using math.log which calculates logarithm, not power.
3fill in blank
hard

Fix the error in the code to get the absolute value of -10 using sass:math.

SASS
@use "sass:math";

$value: math.[1](-10);
Drag options to blanks, or click blank then click option'
Asqrt
Bround
Cpow
Dabs
Attempts:
3 left
💡 Hint
Common Mistakes
Using math.sqrt which calculates square root, not absolute value.
Using math.pow which raises to a power, not absolute value.
4fill in blank
hard

Fill both blanks to create a map of numbers and their rounded values using sass:math.

SASS
@use "sass:math";
$numbers: (1.2, 2.5, 3.7);
$rounded: ([1]: math.[2](1.2), 2.5: math.round(2.5));
Drag options to blanks, or click blank then click option'
A1.2
Bround
C1.3
Dceil
Attempts:
3 left
💡 Hint
Common Mistakes
Using 1.3 as key instead of 1.2.
Using math.ceil instead of math.round for rounding.
5fill in blank
hard

Fill all three blanks to create a map of numbers and their square roots using sass:math.

SASS
@use "sass:math";
$values: ([1]: math.[2](9), [3]: math.sqrt(16));
Drag options to blanks, or click blank then click option'
Anine
Bsqrt
Cfour
Dround
Attempts:
3 left
💡 Hint
Common Mistakes
Using numbers as keys instead of words.
Using math.round instead of math.sqrt for square root.