Labwork #2 Q1. For this PHP exercise, write a script using the following variables: $x=80; $y=20; Use separated print statements to calculate and print the following statements : The multiplication of...



PHP programming



Labwork #2<br>Q1.<br>For this PHP exercise, write a script using the following variables:<br>$x=80;<br>$y=20;<br>Use separated print statements to calculate and print the following statements :<br>The multiplication of 80 and 20 is 1600.<br>The division of 80 by 20 results 4.<br>The remainder of 80 after the divison by 20 is 0.<br>When 20 reduced from 80 the result is 60.<br>When we add 80 by 20 the result is 100.<br>ps. When you change the value of variables $x and S y the output must be dynamically changed. As a hint use<br>variables while preparing the output.<br>Q2.<br>Write a script that will visit each character of a string and concatenate the characters of the string to form a word<br>backward. At the end, your script must display:<br>Yes, a palindrome<br>Or<br>No, your word is not a palindrome.<br>Palindrome: is a word or sentence that reads the same forward as it does backward. Example civic, radar,<br>rotor.<br>ps. use strlen to fünd the length of a string.<br>Restriction: Can not use strev) function.<br>Q3.<br>For this PHP exercise, write a script using the following variables:<br>$x=2;<br>Sexp=20;<br>The script will display the power of $x starting from 0 up to Sexp using the format below:<br>The power of 2s<br>20=1<br>21=2<br>22-4<br>23=8<br>24-16<br>220=1048576<br>ps. When you change the value of variables $x and Sexp the qutput must be dynamically<br>changed pow(Skase Sexponent) function could be used.<br>

Extracted text: Labwork #2 Q1. For this PHP exercise, write a script using the following variables: $x=80; $y=20; Use separated print statements to calculate and print the following statements : The multiplication of 80 and 20 is 1600. The division of 80 by 20 results 4. The remainder of 80 after the divison by 20 is 0. When 20 reduced from 80 the result is 60. When we add 80 by 20 the result is 100. ps. When you change the value of variables $x and S y the output must be dynamically changed. As a hint use variables while preparing the output. Q2. Write a script that will visit each character of a string and concatenate the characters of the string to form a word backward. At the end, your script must display: Yes, a palindrome Or No, your word is not a palindrome. Palindrome: is a word or sentence that reads the same forward as it does backward. Example civic, radar, rotor. ps. use strlen to fünd the length of a string. Restriction: Can not use strev) function. Q3. For this PHP exercise, write a script using the following variables: $x=2; Sexp=20; The script will display the power of $x starting from 0 up to Sexp using the format below: The power of 2s 20=1 21=2 22-4 23=8 24-16 220=1048576 ps. When you change the value of variables $x and Sexp the qutput must be dynamically changed pow(Skase Sexponent) function could be used.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here