Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
single_digit
#python 2.7.12 def single_digit(num): num = str(num) ans = 0 for x in num: ans += int(x) if (ans > 9): return single_digit(ans) else: return ans num = 9223 print "Entered positive number = ", num print 'Output = ',single_digit(num)
run
|
edit
|
history
|
help
0
Chain length calculator
PyClassInit
working with strings
PyLamb
Python learning
information of operating system on which your code is run
Aufgabe 16
rstring
cat
python permutations