Ex5?

2 views
Skip to first unread message

Lucas Amorim

unread,
Jun 9, 2011, 11:37:33 PM6/9/11
to BYU CS 142 (Spring 2011) [McCarthy]
For my wordCount, I'm scanning for ' ' like mentioned in the hint.
However, I think my code is returning more words than the actual
number. Is this fine, or do we have to make sure only WORDs are
counted and not spaces between characters like { or ; ???

Thanks.

Jay McCarthy

unread,
Jun 10, 2011, 6:34:58 AM6/10/11
to byu-cs-jm-14...@googlegroups.com, BYU CS 142 (Spring 2011) [McCarthy]
"I The"

Is just two words

iPhoneから送信

Lucas Amorim

unread,
Jun 15, 2011, 7:00:56 PM6/15/11
to BYU CS 142 (Spring 2011) [McCarthy]
Can we use arrays for this one or do we make a list?

Jay McCarthy

unread,
Jun 15, 2011, 7:57:25 PM6/15/11
to byu-cs-jm-14...@googlegroups.com, BYU CS 142 (Spring 2011) [McCarthy]
5 must use a list while 6 must use an array

iPhoneから送信

Lucas Amorim

unread,
Jun 16, 2011, 9:43:43 AM6/16/11
to byu-cs-jm-14...@googlegroups.com
Is the function supposed to return a String showing the average calculations or just the double (average)?

So instead of:  ((1+2+3)/3) : ((2+3+4)/3) : !
You would return:  2 : 3 : !

Jay McCarthy

unread,
Jun 16, 2011, 11:25:25 AM6/16/11
to byu-cs-jm-14...@googlegroups.com
It is supposed to return a list of numbers.

2011年6月16日13:43 Lucas Amorim <amor...@gmail.com>:

--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Reply all
Reply to author
Forward
0 new messages