Question: Random.php In Random.php, you need to create a script that will solve the following problem using logical and conditional statements of PHP: Generate 500 random

Random.php In Random.php, you need to create a script that will solve the following problem using logical and conditional statements of PHP: Generate 500 random numbers in the range 1 to 50 and assign each random number to the appropriate "Range". There should be 5 ranges such that each range will contain the numbers as below# Range 1: any random number between 1 to 10 Range 2: any random number between 11 to 20 Range 3: any random number between 21 to 30 Range 4: any random number between 31 to 40 Range 5: any random number between 41 to 50 Finally, you need to display the total number of values within each range. Then you have to display the results as a histogram of stars as a percentage of the number of values in each range. Example of sample output is below: 104 numbers are randomly generated in the range between 01 - 10 93 numbers are randomly generated in the range between 11 - 20 90 numbers are randomly generated in the range between 21 - 30 103 numbers are randomly generated in the range between 31 - 40 110 numbers are randomly generated in the range between 41 - 50 Histogram of stars as a percentage of the number of values are displayed below 01 - 10:********************* 11 - 20:******************* 21 - 30:****************** 31 - 40.********************* 41 - 50-********************** Also use the PHP statement include to add your Header, Menu and Footer to the page. Hints for Random.php: In PHP, the built-in function for generating a random number in between two values (Value 1 and Value 2) is: rand Value1, Value2). Formula to calculate the percentage of the numbers of values in a range is: Percentage of number = Randomly_generated_numbers * 100 500
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
