Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.