i made it like this:
but when it comes to 99 it does this
99--> 9+9=18-->1+8=9
thats wrong according to my professor.
can u help fix my function?
and all the ones u have made so far have been perfect! u are really helping me. thank u sir! :P
Code:
def tvarsumman(n): if n<10: print n else: tvarsumman((n/10) + n%10)
99--> 9+9=18-->1+8=9
thats wrong according to my professor.
can u help fix my function?
and all the ones u have made so far have been perfect! u are really helping me. thank u sir! :P
Comment