6 kyu

Time-like string format

167 of 1,239vshjxyz
Description
Loading description...
Strings
Fundamentals
View
AllIssues4Questions1SuggestionsShow Resolved
  • Please sign in or sign up to leave a comment.
  • type876 Avatar

    What do we need to return in cases like this exactly? -> The method has not thrown any exception (input : 80) I don't understand what kind of answer is expected in this case... The format of string in particular. it just says:'should raise an exception'. But doesn't take such an answer in string, in cases where it's actually an exception?

  • FArekkusu Avatar

    There's no real explanation as to what the expected string format is.

  • WestwardLand968 Avatar

    We should use assertEquals. Old things should not stay old.

  • cliffstamp Avatar

    This comment has been hidden.

  • LambyPants Avatar

    Definitely too easy for a 5 but good practice for RegEx

  • Ignacio Long Avatar

    This comment has been hidden.

  • iamchingel Avatar

    This question is 7kyu at best...People finding this question difficult maybe because the question doesnt have example test cases..TO ADD EXAMPLE TEST CASES: 1. Edit your kata 2. Move your curosr to the bottom right quadrant, where you will find "Example Test Cases" 3.Add example test cases...here is one example for your "Time-Like string format" kata...Test.assertEquals(solution(800), "8:00");

  • danmarcus Avatar

    This comment has been hidden.

  • gomesalexandre Avatar

    Awesome kata ! Making us use the "exception throwing" system to learn a new.. statement ;)

  • jbarget Avatar

    I passed by submitting but failed when I tried to run the tests. Think it might be becuase there are no 'example test cases'

  • ankr Avatar

    I don't think this is hard enough to be a 5kyu - more like 6 or 7?

  • dmitry Avatar

    This comment has been hidden.

  • vshjxyz Avatar

    True, but there's no specification that you have to validate the time like that (even if it's not an error)

  • madmaurice Avatar

    isnt 80 an invalid input because there is no time like 0:80 ?