Ad
  • Custom User Avatar

    I made this just for check the outcomes in a range between 0 and 49:

    for i in range(50):
    print("For ", i, "Digital root: ", digital_root(i))

    if you just leave the "or n" and don't put there the "and 9", the numbers that are divisible by 9 greater than 9 (18, 27, 36,...) will return themselves without adding their digits. Do the excercise and check it for yourself.

    I took me some google searches about precedence and read other users replies to understand how the code works.

  • Default User Avatar

    No problem: you could have seen at the top of the page that 966 guys passed the Python kata (BTW don't forget to give the language you used).
    Moreover it's a question, not an issue.

  • Default User Avatar

    People, Spiler tags are here for a reason.