# Math Blocks

Math blocks encompass the blocks used to perform mathematical operations and calculations. They allow you to manipulate numerical data, perform calculations, and create algorithms or formulas to solve problems.

Use this block to specify a number you want to use in your app.

These blocks allow you to perform arithmetic calculations.

This block returns a random integer within a specified range, inclusive of the provided integers.

This block returns a random fraction

$x$

where $0 ≤ x < 1$

Use this block to round a decimal figure up or down into an integer.

Use these blocks to calculate logarithms of numbers, providing a way to determine the power to which a base must be raised to produce a specific value. These blocks help in handling exponential relationships and solving problems involving the exponential growth or decay of quantities.

Use this block to round a decimal figure to a selected number of decimal places.

If the provided number is below the lower bound, this block adjusts it to match the lower bound. Similarly, if the number exceeds the upper bound, this block adjusts it to align with the upper bound.

This block returns the remainder when a number is divided by another number.

This block returns a value assuming the input is given in degrees.

This block returns true or false

**based on whether the chosen condition applies to the number.**The "irrational numbers" block is represented by π in the math blocks drawer. You can use the dropdown menu to access other irrational numbers.

There is a block in the lists drawer of blocks that returns mathematical values from a list, including sum, minimum, maximum, average, etc. You can learn more here: Lists Blocks.

Last modified 2mo ago