Formatting a solved problem #3187
AaphexTwin
started this conversation in
General
Replies: 1 comment 2 replies
-
` def strong_num(n) :
strong_num(int(input())) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Tell me how to correctly format the solution to the problem. I did everything right, but I don’t know what to add to make it work. maybe you need to use 'return' somehow.
import math def strong_num(n): k = [] a = 0 b = n while n > 0: k.append(n % 10) n = n // 10 a += (math.factorial(k[0])) k.pop(0) if a == b: print("STRONG!!!!") else: print("Not Strong !!") strong_num(int(input())) https://www.codewars.com/kata/5a4d303f880385399b000001/train/python - exercise
Beta Was this translation helpful? Give feedback.
All reactions