Удалить kal.py
This commit is contained in:
parent
97facb2c78
commit
b7b19074f1
22
kal.py
22
kal.py
@ -1,22 +0,0 @@
|
|||||||
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")
|
|
||||||
Loading…
Reference in New Issue
Block a user