declare
v_class_id enrollments.class_id%type:=:class;
v_avg enrollments.final_numeric_grade%type;
begin

select avg(final_numeric_grade)
into v_avg
from enrollments
where class_id=v_class_id;
dbms_output.put_line('the class '||v_class_id||' has the avarage '||NVL(v_avg,0));
end;