Week 3 Ex 57

66 views
Skip to first unread message

Tony Ylönen

unread,
Jan 2, 2016, 12:22:42 PM1/2/16
to mooc.fi
Hi,

I'm having some trouble with week 3 exercise 57.

My program seems to be failing locally due to testi4 (take into consideration the situation where the name is less than three characters). As far as I can tell (and have tested), the program seems to be working fine even if the input is less than three characters. My solution here was to input a while-loop, which checks for the length of the name and asks the user to input another name if the length is less than three characters. Is there something wrong with this method? Thanks in advance for your help.


Best regards,
Tony Ylönen

Jarmo Isotalo

unread,
Jan 2, 2016, 1:55:55 PM1/2/16
to Tony Ylönen, mooc.fi
I think the exercise description describes that if length of the name is less than 3 characters the program should print nothing. And it probably won't accept any alternative solution...

Best,
Jarmo

--
http://mooc.fi
---
You received this message because you are subscribed to the Google Groups "mooc.fi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moocfi+un...@googlegroups.com.
To post to this group, send email to moo...@googlegroups.com.
Visit this group at https://groups.google.com/group/moocfi.
To view this discussion on the web visit https://groups.google.com/d/msgid/moocfi/b763a985-ced5-41d0-b48c-d888727e34e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ylone...@hotmail.com

unread,
Jan 3, 2016, 1:10:44 PM1/3/16
to mooc.fi, ylone...@hotmail.com
Ah, that was the problem, thanks a bunch!

Regards,
Tony Ylönen
Reply all
Reply to author
Forward
0 new messages