From cb4c5516ad4401b093590fff9a33e043348f7ef8 Mon Sep 17 00:00:00 2001 From: typosaurus Date: Sat, 25 Jul 2026 18:49:12 +0200 Subject: [PATCH] feat: add modulo and ignore build artifacts --- .gitignore | 2 ++ src/__pycache__/calculator.cpython-315.pyc | Bin 1391 -> 0 bytes src/calculator.py | 10 +++------- 3 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 .gitignore delete mode 100644 src/__pycache__/calculator.cpython-315.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a60b85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.pyc diff --git a/src/__pycache__/calculator.cpython-315.pyc b/src/__pycache__/calculator.cpython-315.pyc deleted file mode 100644 index 188bff0cbf453b74ab1c50aec4fb7939e25a108f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1391 zcmd5+&ubG=5T3WYNw#fFQx%gy)!INI80~fO8O{e9G#h zGiGyCRpz*=oD*6E&Wt1eV61L;lfVGph&p?xLNSZYAq+J%$b%VD5pP&qL(V{=+pddC zgwzS_8o;-O#ZQfqQNlcZ{v9HbW567#n!q_SDOoBeMTk;7Klz=N!^bHrQOZiBSV=>@ zo)uMbbRtO=us{YESrtkB!igEhyAo|j;vJgeAdsp3=X7wP;O&b@uD>m3dMbaoZ6^+- zzaR9lLhIE({)^jkZZ29v7nM^Wb$Dyc=4eZq<1OX9ntU#1RnX}Z(iA(e@s=8%3VIo~ zXU_sXD^I4lEvRiS5lT;pcEa@ai?08{kNmK^vfEqfdl*uK&o}KL_Ff={c(r=6yutPG z9_?0lxJ!VVDwqE(4*K5<>s!g$yERV diff --git a/src/calculator.py b/src/calculator.py index 983e401..b6e95e6 100644 --- a/src/calculator.py +++ b/src/calculator.py @@ -8,11 +8,7 @@ def subtract(left: int, right: int) -> int: return left - right -def multiply(left: int, right: int) -> int: - return left * right - - -def divide(left: int, right: int) -> int: +def modulo(left: int, right: int) -> int: if right == 0: - raise ValueError('division by zero') - return left // right + raise ValueError('modulo by zero') + return left % right