We say a number is upside up, if we can read the same number when we turn it 180°. The numbers 689 and 1961 are upside up.
Write the function upsideup, where a number $$n \in \mathbb{N}$$ needs to be given as an argument. The function has to print a Boolean value as a result, indicating whether the number is upside up or not.
Use the function upsideup to write a function next, to which a number $$n \in \mathbb{N}$$ has to be given as an argument. The function has to give the next upside up number that is larger than $$n$$.
>>> upsideup(689)
True
>>> upsideup(1961)
True
>>> upsideup(2965)
False
>>> upsideup(68089)
True
>>> upsideup(90306)
False
>>> next(689)
808
>>> next(1961)
6009
>>> next(98765)
98886