0
0
SASSmarkup~5 mins

sass:math module - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A@require "sass:math";
B@use "sass:math";
C@import "sass:math";
D@include "sass:math";
What does math.sqrt(16) return?
A8
B256
C16
D4
Which function returns the absolute value of a number?
Amath.abs()
Bmath.pow()
Cmath.sqrt()
Dmath.pi
What is the output of math.pow(3, 2)?
A5
B6
C9
D8
Which constant does math.pi represent?
APi (π)
BGolden ratio
CSquare root of 2
DEuler's number
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.