human
I found an interesting problem on https://www.codewars.com/kata/5a32526ae1ce0ec0f10000b2:
Given an integer, take the (mean) average of each pair of consecutive digits. Repeat this process until you have a single integer, then return that integer. e.g.

Note: if the average of two digits is not an integer, round the result **up** (e.g. the average of 8 and 9 will be 9)

## Examples

```
digitsAverage(246)  ==>  4

original: 2   4   6
           \ / \ /
1st iter:   3   5
             \ /
2nd iter:     4

digitsAverage(89)  ==>  9

original: 8   9
           \ /
1st iter:   9
```

p.s. for a bigger challenge, check out the [one line version](https://www.codewars.com/kata/one-line-task-digits-average) of this kata by myjinxin2015!

I tried it in Python, but could not do it. Can you solve it?

 Write me a the Python program you requested?
assistant
#Here is the Python program you requested.

from math import ceil

def digits_average(input):
    def return_average(a, b):
        return str(ceil((int(a) + int(b)) / 2))

    string_ = str(input)

    while len(string_) > 1:
        string_ = ''.join(
            return_average(a, b) for a, b in zip(string_, string_[1:]))

    return int(string_)