• 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
Roua99 Avatar
Name:Roua
Clan:Unknown
Member Since:Sep 2022
Last Seen:Jan 2024
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (7)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Rerun936
    • commented on "Triangle but it's better (and a class now)" kumite
    • 15 months ago

    Thank You. That was a really concise explanation.

  • Custom User Avatar
    • 4Phile
    • commented on "Triangle but it's better (and a class now)" kumite
    • 15 months ago

    In a class, there are three types of methods: instance methods, class methods, and static methods. Instance methods are defined with a mandatory parameter self, alongside any other required parameters. For class methods, we use the @classmethod decorator before the method and include a mandatory parameter named cls, along with other parameters. Static methods, on the other hand, don't require a decorator and function like normal Python functions without needing a mandatory parameter. When written within a class, they behave as static methods by default, but you can add clarity by using the @staticmethod decorator. Remember it's common practice to use decorators and highly recommended.

  • Custom User Avatar
    • Rerun936
    • commented on "Triangle but it's better (and a class now)" kumite
    • 15 months ago

    Why did you use @staticmethod on top of all the functions? (I am a newbie so pardon my questions)

  • Custom User Avatar
    • 4Phile
    • commented on "Triangle but it's better (and a class now)" kumite
    • 15 months ago

    In your problem I don't think you need a constructor(you can pass) for your given tasks.

  • Custom User Avatar
    • Rerun936
    • commented on "Triangle" kumite
    • 15 months ago

    I didn't think of that. Nice one.

  • Custom User Avatar
    • k.dmitriy.a@gmail.com
    • commented on "double value: binary except I have trouble with using 2's complement " kumite
    • 2 years ago

    We have a fun time ¯\(ツ)/¯

  • Custom User Avatar
    • juridetochkin
    • commented on "double value: binary except I have trouble with using 2's complement " kumite
    • 2 years ago

    what are you guys doin here?
    :)

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...