• 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
Gitrust Avatar
Name:Egle Salaseviciute
Clan:Unknown
Member Since:Nov 2023
Last Seen:Jan 2024
Profiles:
    Following:0
    Followers:0
    Allies:0
    View Profile Badges
    Ad
    Educator, struggling to assess your students?
    Assess your classroom or bootcamp with the world leading assessment platform, Qualified.Request your demo today!
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations
    • Replies (2)
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • B1ts
      • commented on "Grasshopper - Summation" kata
      • 2 years ago

      Hello. You misunderstood what that message says. It says that your returned value 3 is not equal to expected value 36 for some unknown input (actually, that input is n = 8).

      Having a quick look at your code, your function always returns in the first iteration of your loop (when i = 1), which is not correct. 1+2+3...+8 is not equal to 3.

      Have a look at this article for some general tips: https://docs.codewars.com/training/troubleshooting

    • Custom User Avatar
      • Chrono79
      • resolved an issue on "Grasshopper - Summation" kata
      • 2 years ago

      Your code is wrong, it always returns 3 for any number greater than 1. Not a kata issue. Please read this: https://docs.codewars.com/training/troubleshooting

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...