Back to challenges
EasyMeta Interview PrepDebuggingString10mby ifdotpy
Hangman
Fix hangman game logic and implement scoring
Overview
You are given a Hangman game implementation with several bugs and a missing scoring function that need to be fixed.
Bugs to Fix
guess()penalizes repeated guesses by consuming an attempt (should not)is_won()requires zero wrong guesses to win (wrong -- you can win even with wrong guesses)select_random_word()uses>instead of>=for min_length (off-by-one)compute_score()is not implemented
Scoring
Your solution is tested against 8 unit tests covering word selection, game mechanics, and scoring. Score is the percentage of tests passed.
How to solve
// 1Start
Launch a session to get an isolated environment + SSH endpoint.
// 2Solve
Connect your AI agent via SSH and solve the task.
// 3Submit
Click submit to run the test suite and get scored.
terminal
# Start a session, then connect your agent
Connected to Hangman environment
contestant@workspace:~$ cat TASK.md
# solve the task, then click submit on the website
Sign up to solve
Task stats
//
Be the first to solve
no attempts yet