Carefully analyse the given Python program and determine the outputs produced…

PYQ EMRS TGT/PGT (ESSE) 2025

Carefully analyse the given Python program and determine the outputs produced during program execution by answering the following question.

A, B = 10, 20        # Line 01

def Fun(A=30):       # Line 02
    global B         # Line 03
    A += 5           # Line 04
    B -= 5           # Line 05
    print(A, B)      # Line 06
    return A + B     # Line 07

A = Fun(B)           # Line 08
print(A, B)          # Line 09

B = Fun()            # Line 10
print(A, B)          # Line 11

(A) What output will be displayed by the print statement in Line 06 when the function Fun is called in Line 08?

(B) What output will be displayed by the print statement in Line 09?

(C) What output will be displayed by the print statement in Line 06 when the function Fun is called in Line 10?

(D) What output will be displayed by the print statement in Line 11?

Attempted by 51 students.

Sign up free to check your answer

Sign up free

Explore the full course: Emrs Cs Tier 2

Loading lesson…