This topic is about the puzzle Hangman.
Feel free to send your feedback or ask some help here!
This topic is about the puzzle Hangman.
Feel free to send your feedback or ask some help here!
Hi, i canāt pass test 1, even if i try to hardcoded the result with any type of hangman ascii plus the input word since itās stated as āfound solutionā.
Which language are you using?
iām using javascript
Hi, I cannot pass the first test when submitting my code . All hardcoded tests pass, I have tried testing my code with different inputs but without result. Has someone any idea? (Iām using C#)
Edit: Well, I just solve my problem: I had a white space in my ASCII art
Thanks for the hint. I had the same problem (extra space in the gallows) with the first test.
I found this easier than most Medium puzzles. Why is it hard, I wonder.
Hi, so Iāve passed all the test cases. But for some reason, when I submit my code, it says that I failed the first validation test. Iāve checked and thereās nothing wrong with the ASCII art. Any ideas?
Try testing that your code would successfully print all the versions of hangman - I.e. Empty, head, head and chest etc.
You can use the custom case below to help.
Hint: Try a case where there is only 1 incorrect guess.
Input:
abiding
z a i b n g d
Expected output:
+--+
| o
|
|\
abiding
Note: Iāve not actually done this puzzle myself yet but I believe this should be correct and help you out.
Hope this helps
Okay, you wouldnāt believe this⦠Iāve mistaken ā!ā for ā|ā, thatās why I got it wrong! Maybe I shouldāve get my eyes checked, lol. Anyway, thanks for your help!
Description should mention about case in-sensitivity when handling the letters in given input (as in both uppercase and lowercase letters of the same alphabet are considered the same)
Should explicitly mention that one only needs to handle letters in the output, as in all non-alphabetic characters are not to be replaced with a _
in the output if not found.
Should highlight the word chars
for Input && Constraint section
Constraints should mention the character range of entry
too
Also missing
test case where the mistake count is greater than 6. This will cause a lot of solutions which do not exit early to fail
test case that includes special characters other than spaces in input
, which will cause a lot of solutions that only check for c != " "
to fail
All have been fixed.
Since the game is over after the 6th wrong guess is made, there shouldnāt be more guesses.
The input description states that only lowercase letters are guessed, so there shouldnāt be other special characters. The same with [[entry]], where Iāve added a constraint on that.
Thanks for the fixes. I think you misunderstood me regarding this
Since the game is over after the 6th wrong guess is made, there shouldnāt be more guesses.
Yes, that is the rule, but some solutions like mine did not break out of the loop during the 6th mistake, which will cause Index Out Of Range Error for the 7th, 8th mistakes etc⦠which proves that test cases with more than 6 mistakes are non-existent, thus should be added. I can send you a screenshot of my solution via PM if you still cannot grasp on what I meant!