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
asxsd
http_request
NormalizedTags
Data structures
0aa6d60d0504c8470fc90c1d5cbf06083cdaadeab6e102bf90732ac2ab66dfdc
a
No of Minutes in 7 weeks
NormalizeTags
bacs_class
Gani