From a6079faa5579784d0136daf1dcbfe569ea12b336 Mon Sep 17 00:00:00 2001 From: Andrew Emelyaneko Date: Sun, 27 Sep 2026 23:03:14 +0300 Subject: [PATCH] initial: add calculator function --- pipeline_test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pipeline_test.py diff --git a/pipeline_test.py b/pipeline_test.py new file mode 100644 index 0000000..35d5522 --- /dev/null +++ b/pipeline_test.py @@ -0,0 +1,14 @@ +def calc(a, b, op): + if op == "+": + return a + b + elif op == "-": + return a - b + elif op == "*": + return a * b + elif op == "/": + if b != 0: + return a / b + else: + return "error" + else: + return "unknown op" \ No newline at end of file