week 2 exercise 42 last test not pass

211 views
Skip to first unread message

ivana...@gmail.com

unread,
Dec 20, 2015, 7:27:19 PM12/20/15
to mooc.fi
Hi,

I'm having problems with week 2 exercise 42 Run tests localy.

The last test fail: 
"FAIL:HangmanTest manAndWordNotPrintedIfLoopNotCompleted
You should call hangman.printWord() only at the end of while-loop, do not call the method from elsewhere"

I cannot see where I'm calling printWord() beside the end of the while-loop.

The link to my work is here: http://paste.mooc.fi/6514051c

Best regards,
Ivana


Supported languages are English and Finnish

Please use our build in TMC Pastebin when asking questions related to your code  
 
TMC Plugin has built-in code sharing feature. 
In NetBeans, select TMC -> Send code to TMC pastebin. Copy the link you receive and paste it to your message.  

You may use our web interface to share code snippets: http://paste.mooc.fi

ljleppan

unread,
Jan 4, 2016, 3:58:35 AM1/4/16
to mooc.fi, ivana...@gmail.com
Hi Ivana,

Sorry for the long response time; we've been busy with christmas :)

I'll gladly take a look at your code, but I'll need to paste that contains all your code. To do this, open the TMC menu in NetBeans, select "Send to pastebin" and paste the link you receive here.

-Leo

ivana...@gmail.com

unread,
Jan 4, 2016, 3:02:54 PM1/4/16
to mooc.fi, ivana...@gmail.com
Hi Leo,

Happy New Year!

I solved this one too:

hangman.printWord() was called only once at the end of the while loop. The error was that hangman.printWord()  was called after the end of the while loop, that is outside of the while loop, not inside the while loop.

Please mark this question solved.

Thanks,
Ivana
Reply all
Reply to author
Forward
0 new messages