Simple, modifica esto:
Código:
while ($row = mysql_fetch_array($sql))
{
?>
<table border="1">
<tr align="center" bgcolor="#CC00CC" bordercolor="#000000">
<td>Materia</td>
<td>Definitiva</td>
<tr>
<td><?php print $row['nombre_materia']; ?> </td>
<td><?php print $row['Nota']; ?> </td>
</tr>
<?php } ?>
Por esto:
Código:
<table border="1">
while ($row = mysql_fetch_array($sql))
{
?>
<tr align="center" bgcolor="#CC00CC" bordercolor="#000000">
<td>Materia</td>
<td>Definitiva</td>
<tr>
<td><?php print $row['nombre_materia']; ?> </td>
<td><?php print $row['Nota']; ?> </td>
</tr>
<?php } ?>
Tu error es que estas repitiendo el tag de la tabla, lo pusiste dentro del while, es solo ponerlo fuera y queda listo