• 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
naidu@123 Avatar
Name:Unknown
Clan:Nokia,India
Member Since:Oct 2016
Last Seen:Nov 2020
Profiles:
    Following:89
    Followers:94
    Allies:89
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (41)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • maroun_aj
      • commented on "Bouncing Balls" python solution
      • 4 months ago

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

    • Custom User Avatar
      • dietrichR
      • commented on "Bouncing Balls" python solution
      • 17 months ago

      sorry accidentelly flagged your comment unflagged it.

    • Custom User Avatar
      • sadcatcode
      • commented on "Bouncing Balls" python solution
      • 2 years ago

      i think it's because you did not check if bounce was equal to 1, which would cause an infinite loop, the same happened to me

    • Custom User Avatar
      • Mt. Will
      • commented on "Bouncing Balls" python solution
      • 2 years ago

      Because if any of us are actually led to believe this is "Best Practice" and decide to use this code in a production environment or for an interview with Google, it would be bad.

    • Custom User Avatar
      • The Gentleman
      • commented on "Bouncing Balls" python solution
      • 2 years ago

      I tried doing something similar, but an issue came up saying it took way to long and I had to use another solution. Maybe I could have optimized another part for it to work. Anyhow, good work.

    • Custom User Avatar
      • ginestah
      • commented on "Bouncing Balls" python solution
      • 2 years ago

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

    • Custom User Avatar
      • unclejoefx
      • commented on "Bouncing Balls" python solution
      • 2 years ago

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

    • Custom User Avatar
      • lszatmary
      • commented on "Bouncing Balls" python solution
      • 2 years ago

      I'm also getting confused. As I know changing a variable's value in a function doesn't affect the variable outside of the scope. For that we use the global command.

    • Custom User Avatar
      • laz5645
      • commented on "Bouncing Balls" python solution
      • 2 years ago

      the language here is ambiguous, but it is assumed that we are talking about an entire window, hence if it goes above the window it will go down for a second viewing.

    • Custom User Avatar
      • Zimo沫
      • commented on "Bouncing Balls" python solution
      • 3 years ago

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

    • Custom User Avatar
      • realnerfelitewar
      • commented on "Explosive Sum" python solution
      • 3 years ago

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

    • Custom User Avatar
      • DrKoop
      • commented on "Bouncing Balls" python solution
      • 3 years ago

      Beautiful.

    • Custom User Avatar
      • agusdmb
      • commented on "Bouncing Balls" python solution
      • 3 years ago

      i don't understand why this got so many "best practices" votes

    • Custom User Avatar
      • agusdmb
      • commented on "Bouncing Balls" python solution
      • 3 years ago

      In this case is ok, since the parameters are integers and float numbers, so changing them inside the function will not change the value in the caller. If instead this was a list, a set, or other types that are passed as refrences then changing the value inside the function could cause side effects outside the function

    • Custom User Avatar
      • iamapython
      • commented on "Bouncing Balls" python solution
      • 3 years ago

      Sure. You can modify its name.

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...