Week 7, 107 Smileys

98 views
Skip to first unread message

jpsal...@gmail.com

unread,
Dec 5, 2015, 10:14:08 AM12/5/15
to mooc.fi
Hi,

I'm having problems with week 7, 107, Smileys.

I get the error message: Ensure that there is a smiley and whitespace in front of the given parameter.

My out out put seems to be fine with the any word:
:):):):):)
:)Mikael:)
:):):):):)
:):):):):)
:) Arto :)
:):):):):)
:):):):):)
:)Matti :)
:):):):):)
:):):):):)
:) 87.  :)
:):):):):)
:):):):):)
:) \:D/ :)
:):):):):)

Did I understood something wrong with the task, or is my program faulty in some other way?


Best regards
Jukka-Pekka


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,
Dec 7, 2015, 3:48:34 AM12/7/15
to mooc.fi, jpsal...@gmail.com
Hi Juha-Pekka,

Try out your program with printWithSmileys("Mikke"); 

As of now, your program prints out 

:):):):):)
:)Mikke :)
:):):):):)

The issue here is that there should be a space on the second line between the first smiley and the word Mikke. So the correct output would be:

:):):):):):)
:) Mikke  :)
:):):):):):)

-Leo

jpsal...@gmail.com

unread,
Dec 7, 2015, 11:18:26 AM12/7/15
to mooc.fi, jpsal...@gmail.com
Hi,

Ok. I got it now. I understood the the assignment wrong in the first place. I thought the the amount of the smiles should be 5 in the upper and lower row and in the middle row should be the text and as many smiles as possible.

Jukka-Pekka
Reply all
Reply to author
Forward
0 new messages