Skip to the content.

Fall 2024 - P3

3.2 Mathematical Expressions; Mathematical Functions

Student led teaching on Mathematical Expressions. Learn how mathematical expressions involve using arithmetic operators (like addition, subtraction, multiplication, and division) to perform calculations

Add Subtract Multiply and Divide Functions

%%javascript

function add(a, b) {
    return a+b
}

function subtract(a, b) {
    return a-b
}

function multiply(a, b) {
    return a*b
}

function divide(a, b) {
    return a/b
}

function mod(a, b) {
    return a % b
}

function exponent(a, b) {
    return a^b
}
<IPython.core.display.Javascript object>