6 kyu

Level Up!

Description
Loading description...
Iterators
Algorithms
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Easy game development concept.

  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • mauro-1 Avatar

    What is the goal of this kata? Teaching bad practices?

    • multiple return types
    • more input validation than algorithm
    • input validation done in the worst way (python has exception, why return strings???)
    • in python number of args is automatically checked, why bypass automatic checks and return a useless string?

    This input validation is worse than no input validation.

  • Yo-ge-sh Avatar

    more test coverage on boundaries needed

  • wneumann Avatar

    Swift 5 translation kumited. Please review and approve if acceptable.

  • Voile Avatar

    If you're doing this much input validation (which I'm not a fan of, but I can set it aside), you're also missing the case where only 1 parameter is provided.

  • Voile Avatar

    Shouldn't Make sure you round down the XP required for each level up, rounding up will result in the output being slightly wrong. be put inside the description and not at the end? Since it's a crucial piece of information.

  • darkwood69 Avatar

    This comment has been hidden.

  • fenring76 Avatar

    This comment has been hidden.

  • Blind4Basics Avatar

    Hi,

    Your kata needs more test coverage on boundaries and you have an error when checking for level 1 target.

    Tests to add, in my opinion:
    xp_to_target_lvl(314,2)  # alreaday at lvl 2
    xp_to_target_lvl(313,2)  # expect 1
    xp_to_target_lvl(32,1)  
    xp_to_target_lvl(32,2)  # expect 282
    
    Error in your algo:
    xp_to_target_lvl(59,1) => your algo expect a number, but the player is already at lvl 1!
    

    Other problem in the description: "You have already reached level target_lvl." instead of "You have already reached level (target_lvl).", because I added the parenthesis for nothing, at first.

    Other than that, enjoyable kata. ;)

  • smile67 Avatar

    Different errors during your random tests, see my code... "True" and "False" as valid parameters, >170 not checked, ...? So for me an "issue";-)