Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
tree generator
Attempt to fork bomb server
Rectangle Area
single digit
fibonacci_2
check if any permutations of a word is a palindrome - python
Defining
1.problem_name_1
сщые
Problem Name: single_digit
stackse - search stackoverflow differently
Please log in to post a comment.