Update block docs for: maths.md

This commit is contained in:
Bently
2025-01-13 10:23:39 +00:00
parent c463d1022b
commit 66f2e2a77b

View File

@@ -0,0 +1,45 @@
# Mathematical Operation Blocks
## Calculator
### What it is
A versatile mathematical calculator that performs basic arithmetic operations between two numbers.
### What it does
Takes two numbers and performs one of five mathematical operations: addition, subtraction, multiplication, division, or raising to a power. It can also optionally round the result to the nearest whole number.
### How it works
The calculator takes your chosen operation and two numbers, processes them according to the selected mathematical operation, and returns the result. It includes safety features like handling division by zero and provides special values for error cases.
### Inputs
- Operation: Choose from Add, Subtract, Multiply, Divide, or Power
- Number A: The first number in your calculation
- Number B: The second number in your calculation
- Round Result: Choose whether to round the final answer to a whole number
### Outputs
- Result: The numerical outcome of your calculation
### Possible use case
A teacher creating a grading system could use this to calculate final scores by adding up test results or computing weighted averages.
## Count Items
### What it is
A counting tool that determines how many items are in any collection of data.
### What it does
Counts the number of elements in various types of collections, such as lists, text strings, or sets of items.
### How it works
The counter examines your provided collection and determines its size, returning the total number of items it contains. It works with different types of collections and provides error handling for invalid inputs.
### Inputs
- Collection: The group of items you want to count (can be a list, text string, dictionary, or similar)
### Outputs
- Count: The number of items found in the collection
### Possible use case
An inventory manager could use this to quickly count the number of products in a list or the number of characters in a product description.