From the course: Learning PHP

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Display content based on status

Challenge: Display content based on status - PHP Tutorial

From the course: Learning PHP

Start my 1-month free trial

Challenge: Display content based on status

(bright music) - [Instructor] It's time for another challenge. Imagine you're presented with a randomly generated number between one and 50, and you have a guess. Create a way to give feedback to users such that if they guess correctly, you tell them. If they guess incorrectly, you tell them if they were too high or too low. And as a bonus, also check to see if the guessed number is out of range, that is less than one or more than 50. In the exercise files, you'll be given this starter that has a few variables for you. Min, max, guess, and num. You can change guess and num to whatever you'd like, or if you really want to go nuts, you can use the commented outline which assigns a random value to num within the range between min and max.

Contents