Computer Science, asked by vicky534, 1 year ago

1. Write a Python program to compute sum of digits of a given string.

Answers

Answered by lakshmimaha683
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