From fdc794b2d3b6c7f773c981761ace78926e8494b5 Mon Sep 17 00:00:00 2001 From: RayskayaA Date: Sun, 23 Nov 2025 14:55:59 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=BE=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kal.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 kal.py diff --git a/kal.py b/kal.py new file mode 100644 index 0000000..8c40424 --- /dev/null +++ b/kal.py @@ -0,0 +1,22 @@ +def summa(datas_nums): + a=0 + for i in datas_nums: + a+=int(i) + return a +def multiply(datas_nums): + a=1 + for i in datas_nums: + a=a*int(i) + return a + +datas=str(input("write numbers: ")) +datas_splitted=datas.split() + +choice=str(input("+ or x")) + +if choice =="+": + print(summa(datas_splitted)) +elif choice =="x": + print(multiply(datas_splitted)) +else: + print("Error try again") \ No newline at end of file