Recall & Review
beginner
What is the
sass:math module used for?It provides math functions like
pow(), sqrt(), abs(), and constants like pi to perform calculations in Sass stylesheets.Click to reveal answer
beginner
How do you import the <code>sass:math</code> module in a Sass file?Use
@use "sass:math"; at the top of your Sass file to access math functions.Click to reveal answer
beginner
What does
math.pow(2, 3) return?It returns 8, because it calculates 2 raised to the power of 3 (2³ = 8).
Click to reveal answer
intermediate
Explain the difference between
math.abs(-5) and math.sqrt(25).math.abs(-5) returns 5, the absolute value (distance from zero). math.sqrt(25) returns 5, the square root (number that multiplied by itself gives 25).Click to reveal answer
beginner
What constant does
math.pi provide?It provides the value of π (pi), approximately 3.14159, useful for circle calculations.
Click to reveal answer
Which of these is the correct way to import the
sass:math module?✗ Incorrect
The
@use rule is the modern way to import Sass modules like sass:math.What does
math.sqrt(16) return?✗ Incorrect
math.sqrt(16) returns 4 because 4 × 4 = 16.Which function returns the absolute value of a number?
✗ Incorrect
math.abs() returns the positive distance from zero, ignoring sign.What is the output of
math.pow(3, 2)?✗ Incorrect
math.pow(3, 2) calculates 3 squared, which is 9.Which constant does
math.pi represent?✗ Incorrect
math.pi returns the value of π, about 3.14159.Describe how to use the
sass:math module to calculate the square root of a number in Sass.Think about how you bring in the module and call the function.
You got /3 concepts.
Explain the difference between
math.abs() and math.pow() functions with examples.One deals with positive distance, the other with exponents.
You got /3 concepts.