Question: In this assignment you will be exposed to variables, assignment statements, arithmetic operations, and displaying information using php. 1. Create a new document in your

In this assignment you will be exposed to variables, assignment statements, arithmetic operations, and displaying information using php. 1. Create a new document in your text editor (notepad++) 2. Type the declaration, element, header information, and

element. Use Variables and Arithmetic Operations as the content of the

element. 3. Add the following standard PHP script delimiters to the document body: <?php ?> 4. Add the following statements to the script section. a. Assign the integer 25 to a variable named $number_one. b. Assign the integer 32 to a variable named $number_two. c. Assign the sum of the values that stored in the variables $number_one and $number_two to a variable named $addition. d. Assign the difference of the values that stored in the variables $number_one and $number_two to a variable named $difference. e. Assign the product of the values that stored in the variables $number_one and $number_two to a variable named $product. f. Assign the division of the values that stored in the variables $number_one and $number_two to a variable named $division. g. Assign the remainder of the division of the values stored in the variable $number_one and $number_two to a variable named $remainder. h. Write the echo statement to display the following line: 25 + 32 = 57 Note: Do not include the numbers 25, 32, and 57 in the echo statements. Include the variables whose values are those numbers ($number_one, $number_two, and $addition.) i. Write the echo statement to display the following line: 32 25 = 7 Again, do not include the numbers 32, 25 and 7 in the echo statement but rather the variables that store those values. j. Write the echo statement to display the following line: 25 * 32 = 800 Same as above, Use variable names in the echo statement. k. Write the echo statement to display the following line: 32 / 25 = 1.28 Same as above, use variable names in the echo statement. l. Write the echo statement to display the following line: 32 % 25 = 7 Same as above, use variable names. 5. Save the document as assignment_two.php and place it in the htdocs directory of your XAMPP installation (should be: C:\XAMPP\htdocs). Start XAMPP control panel and start the Apache module. Once Apache has started, you can open the file you just saved in the htdocs directory to see how it renders. It should look similar to the image below. On the browser you should type localhost/assignment_two.php. <p><img style="height:167px;width:456px;" src="https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e3bc59d6ac7_92166e3bc5983388.jpg" alt="In this assignment you will be exposed to variables, assignment statements, arithmetic"> 6. Change the instructions that you have written in 4a and 4b to use the rand() php build in function to generate random numbers between 1 and 100 and assign them to the variables $number_one and $number_two. For example, the statement $number_one = rand(1, 100); Will generate a random integer between 1 and 100 (inclusive) and will assign it to the variable $number_one. Save your file and open it in your Web browser. You will notice that every time you refresh the page, a different set of integer numbers are assigned to the variables $number_one and $number_two and, the results of the operations change accordingly.</p> ocalhosty assignment two.php 25 32 = 57 32-25 = 7 25 * 32 = 800 32 / 25 1.28 32 % 25-7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To accomplish the tasks mentioned in the assignment you need to follow the instructions step by step ... View full answer

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!