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 trialMoutasem Raheem
2,802 Pointsmy code is correct but i am getting (Incorrect output)!!
this is my code
<?php $studentOneName = 'Dave'; $studentOneGPA = 3.8;
$studentTwoName = 'Treasure'; $studentTwoGPA = 4.0;
//Place your code below this comment
if ($studentOneGPA == 4.0) { echo "$studentOneName made the Honor Role"; } else { echo "$studentOneName has a GPA of $studentOneGPA"; }
if ($studentTwoGPA == 4.0) {
echo "$studentTwoName made the Honor Role";
} else {
echo "$studentTwoName has a GPA of $studentTwoGPA";
}
?>
and i am getting Bummer! Incorrect output!! i don't know why
2 Answers
Alexander Davison
65,469 PointsTry changing "role" to "roll" in all places :)
Good luck! ~Alex
Moutasem Raheem
2,802 Pointsthank you so much it's work
Alexander Davison
65,469 PointsNo probs :)
Sean T. Unwin
28,690 PointsI just ran your code by changing "Role" to "Roll", inside both if
statements, and it passed. Jason was setting you on the correct path. Good luck!
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsCan you link to the challenge you're on?
The instructions changed recently and I think it might be "Honor Roll" now instead of "Honor Role"