Question: please answer all In this project, you will modify a nested if statement so it instead uses a compound conditional expression. You will use logical

please answer all

please answer all In this project, you will modify a nested if

In this project, you will modify a nested if statement so it instead uses a compound conditional expression. You will use logical opera- tors such as II (or) and && (and) to execute a conditional or looping statement based on multiple criteria. 1. Create a new document in your text editor 2 Type the declaration, shtml> element, docu- ment head, and element. Use the strict DTD and Gas Prices" as the content of the

element. L Reinforcement Exercises 119 3. Create a script section in the document body that includes the following variable declaration and nested if statement: <?php SGasPrice-2.57: if (SGasPrice >= 2) [ if ($GasPrice 3) echo "<p>Gas prices are between $2.00 and $3.00.</p>"; 4. Modify the nested if statement you created in the previ- ous step so it uses a single if statement with a compound conditional expression. You need to use the US (and) logical operator 5. Add an else clause to the if statement that displays "Gas prices are not between $2.00 and $3.00" if the compound con- ditional expression returns FALSE. 6. Save the document as GasPrices.php in the Projects direc- tory for Chapter 2 and upload the document to the server. 7. Open the GasPrices.php file in your web browser by enter- ing the following URL: http://<yourserver chapter></yourserver>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!