Math ChatBot
JavaScript
Here are examples of each type of calculation:
- Arithmetic calculations:
- Addition: '5 + 3'
- Subtraction: '8 - 5'
- Multiplication: '4 * 7'
- Division: '15 / 3'
- Combination with Parentheses: '(5 + 3) * 2'
- Complex Expressions: '(sqrt(80) + 10) / 2'
- Percentage calculations: '10% of 200'
- Exponents and roots:
- Exponentiation: '5^3'
- Square root: 'sqrt(25)'
- Cube root: 'cubert(27)'
- Trigonometric functions:
- Sine: 'sin(30)'
- Cosine: 'cos(60)'
- Tangent: 'tan(45)'
- Cotangent: 'cot(45)'
- Secant: 'sec(60)'
- Cosecant: 'csc(30)'
- Logarithmic and exponential functions:
- Common logarithm (base 10): 'log(100)'
- Natural logarithm: 'ln(2.71828)'
- Exponential function: 'exp(1)'
Happy coding :p
Feel free to give it a try right here, or if you'd like to customize and create your own version,
you can explore it on my GitHub repository!