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 trialLuis Paulino
Courses Plus Student 1,779 PointsWhat was my grammar mistake?
I'm going to keep looking for the answer,but I could use a little help.
bool isMediumSize;
int inchesTall=64;
if(inchesTall>48;) && (inchesTall<68){
bool isMediumSize=true;
}
1 Answer
Tosin Peters
9,541 PointsThe semi-colon in front of 48 is not supposed to be there and the if statement should have additional brackets if() {} since you're also keeping the conditions in one bracket
Your code should look like this
bool isMediumSize;
int inchesTall=64;
if((inchesTall>48) && (inchesTall<68)){
isMediumSize=true;
}
Luis Paulino
Courses Plus Student 1,779 PointsLuis Paulino
Courses Plus Student 1,779 PointsThanks Tosin...great avatar