6 תשובות
num=int(input("num?"))
ihidot=num%10
asarot=num/10
sum=asarot+ihidot
print (sum)
שואל השאלה:
צריך שזה יהיה עם פונקציה
אנונימית
שואל השאלה:
def
אנונימית
num=int(input("enter a two digit number")
:if num//10 >=1
print (num//10+num%10)
:if not
print ("this is not a two digit number, please restart")
:()def add
num=int(input("enter a two digit number")
:if num//10 >=1
print (num//10+num%10)
:if not
print ("this is not a two digit number, please restart")
inp = input()
def _sum(num):
result = int(num[0])+int(num)[1])
return result
print(_sum(inp))
לא יודע למה כולם סיבכו