Mayra 99.9
Lucy 79
Zack 89
Ariel 89
John-Luke 69.9
Miggy 89
Lorenzo 89
Kourtney 70.9
Mayra, you get a new computer!
Lucy, better luck next time. Don't eat it at once.
Zack, better luck next time. Don't tell anyone. The candy is old.
Ariel. better luck next time, and leave Joya alone.
John-Luke, better luck next time. Sorry I'm out of candy.
Miggy, better luck next time. Ask John-Luke for your candy.
Lorenzo, better luck next time. Here's the last of my new candy. Don't tell anyone.
Kourtney, you get a new pencil!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Assignment039</title>
</head>

<body>

Mayra 99.9<br>
Lucy 79<br>
Zack 89<br>
Ariel 89<br>
John-Luke 69.9<br>
Miggy 89<br>
Lorenzo 89<br>
Kourtney 70.9<br>


<?php
//These are variables to hold the grades
$mayrasgrade=99.9;
$lucysgrade79;
$zacksgrade89;
$arielsgrade=89;
$johnlukesgrade=69.9;
$miggysgrade=89;
$lorenzosgrade=89;
$kourtneysgrade=70.9;

//Here are the if statements to test 
//whether students scored greater than 89.5 (I round up).
if ($mayrasgrade >89.5)
{
print(
"Mayra, you get a new computer!<br>");
}
else
{
print(
"Mayra, better luck next time.  Enjoy the candy, kid.<br>");
}


if (
$lucysgrade >89.5)
{
print(
"Lucy, you get a new computer!<br>");
}
else
{
print(
"Lucy, better luck next time.  Don't eat it at once.<br>");
}


if (
$zacksgrade >89.5)
{
print(
"Zack, you get a new computer!<br>");
}
else
{
print(
"Zack, better luck next time.  Don't tell anyone.  The candy is old.<br>");
}


if (
$arielsgrade >89.5)
{
print(
"Ariel, you get a new computer!<br>");
}
else
{
print(
"Ariel. better luck next time, and leave Joya alone.<br>");
}


if (
$johnlukesgrade >89.5)
{
print(
"John-Luke, you get a new computer!<br>");
}
else
{
print(
"John-Luke, better luck next time.  Sorry I'm out of candy.<br>");
}


if (
$miggysgrade >89.5)
{
print(
"Miggy, you get a new computer!");
}
else
{
print(
"Miggy, better luck next time.  Ask John-Luke for your candy.<br>");
}


if (
$lorenzosgrade >89.5)
{
print(
"Lorenzo, you get a new computer!<br>");
}
else
{
print(
"Lorenzo, better luck next time.  Here's the last of my  new candy.  Don't tell anyone.<br>");
}

//Check this out!  You can add other conditions using elseif!

if ($kourtneyscosgrade >89.5)
{
print(
"Kourtney, you get a new computer!<br>");
}
elseif (
$kourtneysgrade 79.5)
{
print(
"Kourtney, you get a new computer book!");
}
elseif (
$kourtneysgrade 69.5)
{
print(
"Kourtney, you get a new pencil!");
}
else
{
print(
"Kourtney, better luck next time.  <br>");
}

print 
show_source("Assignment039.php");

?>

</body>
</html>
1