create or replace function convert_grade (p_nr_grade number)
return char
is
v_letter_grade char(1);
begin
if p_nr_grade>100 then 
dbms_output.put_line('notele sunt pana la 100!!');
else
v_letter_grade:=
case 
 when (p_nr_grade>=90 and p_nr_grade<=100) then 'A'
 when p_nr_grade>=80 then 'B'
 when p_nr_grade>=70 then 'C'
 when p_nr_grade>=60 then 'D'
else 'F'
end;
end if;
return v_letter_grade;

end;
