Conditions

if/else condition

Age: 22 (minor or adult)

You're an adult.

PHP case

Final Grade: B

Good job!

Explanation:

Conditionals are statements that let your code make decisions based on if something is true or false. If/elseif/else is used to check comparisons or ranges, like checking if an age makes someone a minor or an adult. Switch/case is used to check one variable against a few exact values, like matching a letter grade to a message, each case is a possible match, break stops it once it finds a match, and default runs if nothing matches, kinda like else. The difference is if/else is for ranges and comparisons, while switch/case is for checking exact values.