0
Can someone have a look at this code for me and give me a hint about why it might not work in some instances?
My guess is that it has something to do with the rounding...this is my answer to one of the code coach quizzes. Any help will be much appreciated. Cheers 💪🏽 https://code.sololearn.com/cCA5L2GkahkS/?ref=app
5 Respuestas
+ 2
Right awesome ! Thanks heaps Denise 💪🏽
+ 2
c > A && c < Z || c > a && c < z //you have
c >= A && c <= Z || c >= a && c <= z //you need
+ 1
Hello Andrea Botticini
Did you know that String has a split() method?
String s = "hello world"
String[] arr = s.split(" ");
-> [hello, world]
Here is an example code which removes all punctuation:
https://code.sololearn.com/c7bHiQgDC4zd/?ref=app
Now you have a String array and can count each length of each word.
Using math.ceil() is correct because you have to round up.
Converting to int, print it, done.
Hope this helps :)
0
Andrea Botticini Your welcome :)
0
I see that would have worked too 💪🏽 thanks for that zemiak