DWPD-2.6: Write PHP Script to generate result and display grade.

output php practical 14 generate result and display grade
Lab # 2

Basics of PHP

6. Write PHP Script to generate result and display grade.

Lab-2-6-Grade.php

<?php
$a=50;
echo "Your Grade : ";
switch($a){
case $a>=90:
echo " A <br>";
break;

case $a>=80:
echo " B <br>";
break;

case $a>=70:
echo " C <br>";
break;

case $a>=50:
echo " D <br>";
break;

default:
echo " You are Fail";
break;
}
?>


Output

dwpd 14 output
Displaying Grade | Practical Server


Happy Coding 🙂

Leave a comment