Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAseel Aziz-Gomez
14,807 PointsWhat's wrong with my while loop syntax from quiz?
What's wrong with my "fill in the blank" syntax for the quiz for the while loop?
while(remainigTries > 0) {
throwBall();
}
I entered the '>', ')', and '{'. I also tried '!=' instead of the '>'.
Aseel Aziz-Gomez
14,807 PointsGloria - that is the exact question I'm trying to solve. I put a > sign before the zero, then closed the bracket & opened a curly brace.
I also tried adding (&& !isSolved()) to the condition but that didn't work either.
4 Answers
Gloria Dwomoh
13,116 PointsI suggest you have a look at this similar question, it has thorough explanation on this challenge: fill the blank java object.
ISAIAH S
1,409 PointsMaybe try this:
while (remainingTries ___>___ 0 ___&&___ ___!___ dunkTank.isDunked()) {
throwBall();
}
Aseel Aziz-Gomez
14,807 PointsThanks everyone. Here was my problem: I'm using this on my iPad but I'm not using the app because it keeps crashing on me. I never saw the remaining condition on my screen (the part that says "DunkTank.isDunked()){" . I thought I was losing my mind! I guess from now on I'll check on my computer whenever I get a fill-in the blanks, since my display is obviously off.
Thanks for all your prompt help.
ISAIAH S
1,409 PointsAlways happy to help!
Gloria Dwomoh
13,116 PointsGloria Dwomoh
13,116 PointsThe fill-in example I see doesn't look like the one you have written. I see this
which fill-in-the-blank are you trying to solve? Can you post the full question of the fill-in-the-blank, you are trying to solve?