From 97facb2c78c98e2011edafc2520e728cdfa3caec Mon Sep 17 00:00:00 2001 From: RayskayaA Date: Sun, 23 Nov 2025 14:48:14 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= 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