1. Write a Python program to compute sum of digits of a given string.
Answers
Answered by
5
Answer:
def test():
num=input("Enter a number:")
sum=0
for i in num:
sum+=int(i)
print("Sum=", sum)
Hope it helps! If it did, pls mark it brainliest !
Similar questions