web counter
Write a function in Python to calculate the sum of the digits in a given number.

Write a function in Python to calculate the sum of the digits in a given number.

Input:

Output: def sum_digits(num):
total = 0
while num > 0:
digit = num % 10
total += digit
num = num // 10
return total

Prompt: Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Write a function in Python to calculate the sum of the digits in a given number.

### Input:

### Output:
def sum_digits(num):
total = 0
while num > 0:
digit = num % 10
total += digit
num = num // 10
return total