8 kyu
Exclamation marks series #4: Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string
6,741 of 17,753myjinxin2015
Loading description...
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.
Rust translate
python new test framework is required. updated in this fork
Approved
Scala translation
Approved
CoffeeScript translation
Approved
Description should be language-agnostic
done
JS: in random test program requires TWO exclamation marks instead of one (as in condition), i can't imagine why it's so...
for string: "mmj icxnod! rtsic!!!!!" : expected 'mmj icxnod rtsic!!' to equal 'mmj icxnod rtsic!'
This comment has been hidden.
Not a kata suggestion. Suggestions aim to improve the kata, not teach the basis of a programming language.
this kata does not currently have any known supported versions for JavaScript. It may not be completable due to dependencies on out-dated libraries/language versions.
Please enable Node 14. ~~
It is already enabled, maybe it's a cache problem?
Yes, submitting a solution resolves it despite clicking reset multiple times ~~
I revamped the JS version yesterday and enabled
Node 14
and this happened. I dont know what caused this :(COBOL translation (author inactive).
Approved by someone
JS test cases are a mess full of unused stuff, needs some cleaning.
fixed
No random test in ruby
added
This comment has been hidden.
raising an issue and immediately stating that you're uncertain as to whether it is in fact an issue is not a good way to raise an issue, amirite. 239 coders have solved the kata. it does not require some magic solution ~ my solution is prety basic, really. But if you DO find a problem, please raise that as an issue, provide some concrete evidence, and I'll be more than happy to have a look, thanks.
This comment has been hidden.
I must admit that the C-version is quite tricky in difficulty level for 8kyu kata! But it was still quite educational kata I would say...
This comment has been hidden.
This comment has been hidden.
Your code fails this test:
Not a kata issue.
@betegelse5 Please check your C translation. Thanks ;-)
Notifications do not work that way here; better luck posting a comment under his translation.
OK ;-)
Crystal translation submitted; you might wish to take my code for the Ruby (missing) random tests.
Cheers :)
In C the type of the argument is non-const
char*
but pointers to const data are passed.@betegelse5
fixed
This comment has been hidden.
Approved. Thanks again ;-)
This comment has been hidden.
the input string is not always one or more 'Hi'. For example, if input is 'a! b! c!', the result should be 'a b c!'
the input string is not always one or more 'Hi'. For example, if input is 'a! b! c!', the result should be 'a b c!'
Okay, thanks!
EZPZ
C: Is it possible that among the random tests there is a case where the function gets a string that isn't terminated? To figure out why some of the hidden tests crashed, I put in
printf("s: %s\n", s);
and got:s: !6Pv[m4!!^v;'!^L1$AS3I[!V7Kx]r!Jq=!P*!!!!!4Y[`z[tH('!!!!dycgSDud!!]^R8.Cm/ll7!,q!!'!6@z3z4!#S!G!!kx(!w!!RxM!6!\Eyr!&w'hX!!N@o<::q!#U YO!]h|jh:!2!W5`xCTc(!N!.81PWovE!dk!!dz95FB)!(C9!!Aq>{/!^eWweU!#fd`O,6[Z981v!!!:!!!.....
and after lots of scrolling ....
Test Crashed
Exit code: 0
Signal code: 6
Though, it's not actually random. I'm always getting the same gibberish output, as far as I checked.
Ah~~, I'm crazy, I completely forgot who is the translator of C.. Please check your translation.
@betegelse
I've spent way too much time on this one in C. The final test 20,000 character string SHOULD work, but it doesn't.
Can't even cut and paste the test string into my IDE, as all the random symbols screw with the code.
If anyone has any tips, let me know...
The clojure version does not work:
java.io.FileNotFoundException: Could not locate exclamation_mark/core__init.class or exclamation_mark/core.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(null:1:1)
Who is the translator of clojure? Please check it. Thanks.
Same here, still not working. Same error.
@betegelse, Please check your translation and fix the issue. thanks.
I don't know clojure, and I make some changes with it(the first line
(ns exclamation-mark)
-->(ns exclamation-mark.core)
). @mdib,@Arigion, Please check if it's fixed. thanks ;-)The python version of this kata has no test cases. At first I thought I had some error, but actually there are no test cases. Then I ran it and it passed the test. Please update to include test cases.
I've test it. after click
attempt
, it works. Do you mean theexample testcase
(click runexamples)? I've add testcase to the example testcase block. Thanks point it out ;-)@fjpereny: Thanks for reporting.
@myjinxin2015: Sorry, I forgot to copy the tests to the Example Tests tab. I got no notification about this issue :(
Regards,
suic
Haskell translation kumited! Please review and approve. Regards, suic
PHP Translation Kumited - please accept :D
'alr approved some time ago'
Python translation kumited. Please review and approve.
Regards,
suic
approved ;-)
Hi, is empty string a valid input? If yes, what should the function return?
Thanks,
suic
I think a empty string is not a sentence, perhaps should return "invalid input", but, a beginner kata should not provid such input data ;-)
Thanks, this makes sense but it would be nice to have it explicitly mentioned in the description to avoid situations like this (see the discussion unser Unnamed's comment).
Regards,
suic
Add this to description:
Thanks for this kata series.
The descriptions says to 'Remove all exclamation marks from sentence but keep one at the end' and example tests expects to add exclamation mark at the end if missing:
The word keep in the description may be misleading if this is the expected behavior.
replace "keep" to "ensure"?
Yeah, I think that's better :)
OK. modified ;-)