From bfd1c2c849b4b85926c2a81d01f08af20b4642a1 Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 20:54:30 -0500 Subject: [PATCH 1/6] added functions to calculator --- calculator.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/calculator.py b/calculator.py index 24a2fef..f648fb3 100644 --- a/calculator.py +++ b/calculator.py @@ -1,16 +1,22 @@ -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 -print("I'm going use the calculator functions to multiply 5 and 6") -x = multiply(5,6) -print(x) \ No newline at end of file + +def divide(a, b): + return a / b + + +def square(a): + return a * a + + +def cube(a): + return a * a * a \ No newline at end of file From 3ad1f3fc117b7395f1b36953db2857264907d24d Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 21:23:52 -0500 Subject: [PATCH 2/6] calculator with 4 functions --- .gitignore | 4 ++++ calculator.py | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .gitignore 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/calculator.py b/calculator.py index f648fb3..582b169 100644 --- a/calculator.py +++ b/calculator.py @@ -14,9 +14,6 @@ def divide(a, b): return a / b -def square(a): - return a * a - - -def cube(a): - return a * a * a \ No newline at end of file +print("I'm going use the calculator functions to multiply 5 and 6") +x = multiply(5, 6) +print(x) \ No newline at end of file From 2b4361920ab3bbc90438a9b5df854b9ec26718e6 Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 21:33:00 -0500 Subject: [PATCH 3/6] Stop tracking Python cache files --- __pycache__/calculator.cpython-312.pyc | Bin 606 -> 0 bytes ...test_calculator.cpython-312-pytest-7.4.4.pyc | Bin 14341 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 __pycache__/calculator.cpython-312.pyc delete mode 100644 __pycache__/test_calculator.cpython-312-pytest-7.4.4.pyc diff --git a/__pycache__/calculator.cpython-312.pyc b/__pycache__/calculator.cpython-312.pyc deleted file mode 100644 index 09c608d21c24cac45c2070dcb5378756a7fc0400..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcma)2u};G<5WP#r%8GT)DdN}pz`OKc2Dm}oxJxH{>hm&M} zsyvpeBl0_-ty&uX8K3!|>1{;6lQ2>}g0*uS#ypea bP90NeW_?2B+eXBdh1g!z5Ss={%}nke=zD2v 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 c967c495c3d46be3fae5b88544eb5ac1655785b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14341 zcmeI3%WoUU9mjXMOLF1)3OVU5^fG<9K=lCty`MpFWB3Gp?nQeVFrRA4gzuE?*Y{D~G%RNYEa3KNH zzblg<#@Y2fRITeoYle8pd+crSBWwH6KKwv3mWA}A{h{#4lpe~~St^E{`J#|}GTh(I z^{B8iPjyT<--O|m3B##890`5wZ^QfS1cV&S4L=nLJ24_{xJ;sEpdz!F!R8_lFQl== z&$(MO$kX84UqX$0Aa`U~eXuI9Lb($-Lt-Oqg*>el!ux#owPJ>sB=Nph%ywi`jz}FJ znd@k*#qgP$(_%n-)CrqmxE?V>W`wmHs;N%UZm7_1%wwGAu-(vj`3PU;sCFncVK}!H zSg_lTppf#Yc4LvJOqN)?v1|tIb|X4*yAkDS@a;gmp+UP5f>nhz+=;ZL#JM{ZyOM<5 z)oT0IW~EVW^{@}>VaL$J_WeLU@ojD%$nEu)RvN9fgc1I^y%XPz<6bIZtl&12Fs`!` zxrC7jcjBAY<@JO?F|h-GSAoE2GH7yW*3hiC&)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&5ItWR6)=k6s9}4Gduy~{e5tlVL;LQ2r4yWi37Qv!l60%Bw2n-up0It)uFq2mou06%qv+kqrkvVK4wJYM zbD%b)F%O_4SlNReA$#0GNys0_5q()hZlkaFXKf{!NjRCywFjK2Z~_X+jtdR=wDdIa z0})vqmu%R?5Y8Q0-aD4hPtlq_VwwWZCW+V9ndo4k1|(<;BHh@f`6CE{s)%vPo+|>n zDI9w9d!!bQ)byb@zej4?)A^@i-N3<}zf5rlYLK;frx;A!6;5%77si+Uv%ps$X}=n{ zqrsF-2mmI;hA^jtp3oF};LjTzddB_fV;Fk)pFaM7Q*#V@0DQDgsL!=UE${DG*i-o< z3`;EuV0@)Nfr#ijV_dP> z0~!7A8ydbZczO`tu(<=-8t0_ z+UG0^{VtXlI$twKAvUi>QRJe?f~-&uBz8N7iznL6TAl1y^;`5^xQ^pj109(DrO2{; jBuO7izluFoRr$52QB}^Nfjz&x{B%Z@*N)+EjivQp{O-*b From 142b96ebd1de242b1f67c437dee2819a6883eccf Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 22:51:56 -0500 Subject: [PATCH 4/6] added 2 functions --- calculator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/calculator.py b/calculator.py index 582b169..4720319 100644 --- a/calculator.py +++ b/calculator.py @@ -13,6 +13,17 @@ def subtract(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) From 211b494152bb91f1fd5a9a2198eaa9344e239eee Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 23:12:52 -0500 Subject: [PATCH 5/6] added two functions --- calculator.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 calculator.js diff --git a/calculator.js b/calculator.js new file mode 100644 index 0000000..20bfaa9 --- /dev/null +++ b/calculator.js @@ -0,0 +1,22 @@ +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, +}; From 162eba82d1f6fe7ba58d17818f8774a0a552b433 Mon Sep 17 00:00:00 2001 From: Argenis Contreras Date: Sat, 17 Jan 2026 23:19:17 -0500 Subject: [PATCH 6/6] add functions to calculator --- calculator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/calculator.js b/calculator.js index 20bfaa9..a5a1fcf 100644 --- a/calculator.js +++ b/calculator.js @@ -20,3 +20,6 @@ module.exports = { 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