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 trialDavid Adams
Courses Plus Student 555 PointsLine of code "float foodPrice = 3.5;". Cannot understand why code check is whining about an int.
Bummer! Did you create an int? I don't think so!
float foodPrice = 3.5;
2 Answers
David Adams
Courses Plus Student 555 PointsThanks, Akshat! Yes, I had erased the prior line of code. The instructions were unclear.
Steven Deutsch
21,046 PointsHey David Adams,
EDIT: I misread this thread as your answer + the comment below being one post. They blended together xD
That's odd. When trying to replicate this problem the code challenge misbehaved for me as well. I just restarted my browser and everything worked fine after that. I suggest you try the same if you haven't already.
Also, in the example code you posted, your int declaration has an extra space on the left side of the assignment operator. This could be whats causing the problem.
Good Luck
Akshat Jain
12,819 PointsAkshat Jain
12,819 PointsYou need to complete both objectives to pass the challenge. Just add
int size = 13;
to the top of the file.