6 kyu
Time-like string format
167 of 1,239vshjxyz
Loading description...
Strings
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
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?
There's no real explanation as to what the expected string format is.
Python translation
We should use
assertEquals
. Old things should not stay old.This comment has been hidden.
Definitely too easy for a 5 but good practice for RegEx
This comment has been hidden.
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");
This kata is from a time when Example Tests were a luxury. (As were random tests.)
This comment has been hidden.
Awesome kata ! Making us use the "exception throwing" system to learn a new.. statement ;)
I passed by submitting but failed when I tried to run the tests. Think it might be becuase there are no 'example test cases'
You should always add the error message if possible. That way, one can tell you whether it's a Codewars error or an error with your solution.
I don't think this is hard enough to be a
5kyu
- more like 6 or 7?Indeed! There are some 5kyu katas that I am still struggling with after many hours of effort and this one was like a 5min warmup session. IMHO, subjectivity and persistence of the scale of difficulty is really very hard to normalize since it mostly lies on the eye of the beholder.
Just so you know, I've written this kata way vefore the levels (kyu) were added :) I don't know who set this!
This comment has been hidden.
True, but there's no specification that you have to validate the time like that (even if it's not an error)
isnt 80 an invalid input because there is no time like 0:80 ?
Yes, I think it's a shortcoming of the description and tests that 33:75 is a valid time.