logo

Crowdly

Browser

Add to Chrome

Consider the following code: CREATE OR REPLACE FUNCTION calculate_grade ( ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider

the following code:

CREATE

OR REPLACE FUNCTION calculate_grade (

    p_marks IN NUMBER

)

RETURN VARCHAR2 IS

    v_grade VARCHAR2(2);

BEGIN

    IF p_marks >= 90 THEN

        v_grade := 'A';

    ELSIF p_marks >= 75 THEN

        v_grade := 'B';

    ELSIF p_marks >= 60 THEN

        v_grade := 'C';

    ELSE

        v_grade := 'F';

    END IF;

 

    RETURN v_grade;

END;

/

And

also:

 

DECLARE

    v_result VARCHAR2(2);

BEGIN

    v_result := calculate_grade(82);

    DBMS_OUTPUT.put_line('Student Grade = ' || v_result);

END;

/
Question: What will be the output of the PL/SQL block above when calculate_grade(82) is executed

100%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.uowplatform.edu.au?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome