diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17cd2fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.venv/ +__pycache__/ +*.pyc +.pytest_cache/ diff --git a/__pycache__/calculator.cpython-312.pyc b/__pycache__/calculator.cpython-312.pyc deleted file mode 100644 index 09c608d..0000000 Binary files a/__pycache__/calculator.cpython-312.pyc and /dev/null differ diff --git a/__pycache__/test_calculator.cpython-312-pytest-7.4.4.pyc b/__pycache__/test_calculator.cpython-312-pytest-7.4.4.pyc deleted file mode 100644 index c967c49..0000000 Binary files a/__pycache__/test_calculator.cpython-312-pytest-7.4.4.pyc and /dev/null differ diff --git a/calculator.js b/calculator.js new file mode 100644 index 0000000..a5a1fcf --- /dev/null +++ b/calculator.js @@ -0,0 +1,25 @@ +function multiply(a, b) { + return a * b; +} + +function add(a, b) { + return a + b; +} + +function subtract(a, b) { + return a - b; +} + +function divide(a, b) { + return a / b; +} + +module.exports = { + multiply, + add, + subtract, + divide, +}; +console.log("I'm going use the calculator functions to multiply 5 and 6") +var x = multiply(5,6) +console.log(x) \ No newline at end of file diff --git a/calculator.py b/calculator.py index 24a2fef..4720319 100644 --- a/calculator.py +++ b/calculator.py @@ -1,16 +1,30 @@ -def multiply(a,b): - return a * b +def multiply(a, b): + return a * b -def add(a,b): - return a+b -def subtract(a,b): - return a-b +def add(a, b): + return a + b -def divide(a,b): - return a/b + +def subtract(a, b): + return a - b + + +def divide(a, b): + return a / b + +def square(a): + return a * a + +def cube(a): + return a * a * a + +def square_n_times (number, n): + for _ in range(n): + number = number ** 2 + return number print("I'm going use the calculator functions to multiply 5 and 6") -x = multiply(5,6) +x = multiply(5, 6) print(x) \ No newline at end of file