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 trial

PHP PHP Basics Daily Exercise Program Conditionals

Namazbek Bekarysuly
Namazbek Bekarysuly
882 Points

Wow.. this task is really confusing. Treehouse, change the wording of the task))

Treehouse, this task is confusing. I think It would be better you to either replace the task or make the instruction more clear for other students.

There are a lot of internatianal students who enjoy treehouse courses and this kind of task may stress them esspecially if they are having hard time grasping php))

Another usability thing that has been annoying me is the size of video window. It is really small. I always have to zoom in and out)

index.php
<?php
$studentOneName = 'Dave';
$studentOneGPA = 3.8;

$studentTwoName = 'Treasure';
$studentTwoGPA = 4.0;

//Place your code below this comment

if ()

?>

1 Answer

I don't believe that this challenge needs to replaced or made more clear. I was able to solve it quickly and found it very straight-forward. I think that if you are struggling to complete this, then you should consider going back and reviewing the material. Or, re-read the question a few times carefully. Programming is often difficult and confusing, and if you want to keep going with it I would strongly recommend embracing the difficulty and frustration and resisting the urge to give up or blame the difficulty on external factors. I'll show you my solution, just because I think that when you see it you're going to realize that this task really isn't that complicated, and you may have been over-thinking it.

if ($studentOneGPA == 4.0) {
    echo "$studentOneName made the Honor Roll";
} else {
    echo "$studentOneName has a GPA of $studentOneGPA";
}

if ($studentTwoGPA == 4.0) {
    echo "$studentTwoName made the Honor Roll";
} else {
    echo "$studentTwoName has a GPA of $studentTwoGPA";
}

This solution passes. Keep practicing and learning, and when something is confusing, take a break, review material, regroup, then try again. :)

The task was asking you to check each student's GPA to see if it is 4.0, and if so, echoing out a sentence saying that student made the honor roll. If their GPA was not 4.0, you were supposed to echo out a sentence saying what their GPA is.