• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
vim Avatar
Name:Unknown
Clan:Unknown
Member Since:Mar 2014
Last Seen:Feb 2023
Profiles:
Following:0
Followers:3
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (81)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • AbFighter
    • commented on "Convert a String to a Number!" python solution
    • last month

    easy

  • Custom User Avatar
    • elazarr
    • commented on "Sum of Digits / Digital Root" python solution
    • 2 months ago

    Yes - recursions are fascinating, however, be careful with them. Recursions could be double-edged swords...
    Consider that each recursion level costs in memory on the stack. So if you have too many levels (self invocation) you would end up with a crash on lack of memory (or slowing down your whole computer as your code exhausts whole of the available memory).
    In this specific case it is probably fine - we assume a number with a reasonable number of digits.

  • Custom User Avatar
    • MahmoudBahnasy
    • commented on "Sum of Digits / Digital Root" python solution
    • 3 months ago

    WoW

  • Custom User Avatar
    • Barbhere
    • commented on "Is a number prime?" python solution
    • 3 months ago

    finally I saw a solution similar to mine.

  • Custom User Avatar
    • ILYBIHY
    • commented on "Sum of Digits / Digital Root" python solution
    • 6 months ago

    Oh neat!

    We learned new stuff.

    First and foremost "return n if n < 10" is the base case.

    The map function applies a given function (in this case "int") to every item of something that is iterable. -> new for me!

    Using the string function on the input n, you turn n into a string which is iterable. Therefore the map functiion can now apply a given function to each character of a string. -> the clever part!

    Once the map function is done applying int to every digit, it is then all summed together.

  • Custom User Avatar
    • k-awn
    • commented on "Sum of Digits / Digital Root" python solution
    • 6 months ago

    WHAT

  • Custom User Avatar
    • chechen_borz
    • commented on "Convert a String to a Number!" python solution
    • 7 months ago

    it seems he is working for Google and have no time to answer

  • Custom User Avatar
    • chechen_borz
    • commented on "Convert a String to a Number!" python solution
    • 7 months ago

    very cool my boy

  • Custom User Avatar
    • HB-the-Pencil
    • commented on "Sum of Digits / Digital Root" python solution
    • 9 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • chriscarrollsmith
    • commented on "Sum of Digits / Digital Root" python solution
    • 10 months ago

    I mainly meant efficient in the code golf sense of not requiring many characters. :) Yes, the floor division method is more performant.

  • Custom User Avatar
    • Ahmedrt6
    • commented on "Sum of Digits / Digital Root" python solution
    • 10 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Ahmedrt6
    • commented on "Sum of Digits / Digital Root" python solution
    • 10 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Caffeiiiiiiine
    • commented on "Sum of Digits / Digital Root" python solution
    • 10 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Adzo_09
    • commented on "Convert a String to a Number!" python solution
    • 10 months ago

    yessir

  • Custom User Avatar
    • chriscarrollsmith
    • commented on "Sum of Digits / Digital Root" python solution
    • 10 months ago

    Efficient way to get the digits. I'll have to remember that one.

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...