Question: This is Assignment 6: Create an assignment folder and name it: Assignment 6. You save this assignment file in this folder. You will upload Assignment

This is Assignment 6:

This is Assignment 6: Create an assignment folder and name it: Assignment6. You save this assignment file in this folder. You will upload

Create an assignment folder and name it: Assignment 6. You save this assignment file in this folder. You will upload Assignment 6 folder containing the PHP file into your assigned buckets on AWS > S3 storage area. Please refer to the instructions that I emailed you regarding login to AWS. Summary: You create a PHP file that will run from your local host (XAMPP or MAMP) to exercise a While loop. In this exercise you are going to use a While loop to figure out how much tip ( in percentage) you can afford. See screenshot below. Instructions: 1. Create a new document using VS Code or your text editor and save this file as: yourlastnameMealsTip.php. This file includes both HTML and PHP statements. 2. Type the span class="katex">> declaration, element, header information, and > element. Use "Calculating Restaurant Check" as the content of the element and tags. 3. In the Title type your full name 4. Between the and body > 1. Create a new document in your text editor using VS code save it as: yourlastnameMealsTip.php. This file contains both HTML and PHP statements. 2. Type the span class="katex">> declaration, element, >, elements, and element. 3. In the Title type: "Calculating Restaurant Check" as the content of the element. 4. Add the standard PHP delimiters to the document body: 5. Type PHP codes to display: "Start the Calculations" and add three blank lines below this text. 6. Imagine you have certain amount of money (cash_on_hand) and order a meal (meal). You compute cost of meal (cost) by adding meal and tip (tip_percent). 7. Declare the following variables, use proper PHP syntax for declaring variables: - cash_on_hand and assign some value to it. - meal, and assign some value to it. - tip_percent, and assign some value to it. - cost, to be computed. 8. Calculate cost with a tip and store it in a variable named: cost. Cost formula is: meal + meal * (tip_percent / 100). 9. Make sure that cash is a little more than meal price. For example assign $20 for cash_on_hand and $15 for meal and 15% to tip_percent. 10. Create a while-loop that runs as long as cost is less than cash_on_hand and displays the following in each run : I can afford a tip of 15%, for Total Cost: (17.25) such that 15% is coming from variable tip_percent and 17.25 from cost. When cost is greater than cash-on-hand, then loop stops. In e iteration, loop displays this message and adds 1% to tip_percent until meal cost exceeds your cash_on_hand. 11 Save the document as yourlastnameMealsTip.php

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!