Find the output of the following code of Python. def MessageGame(Msg, Nums):…

PYQ KVS TGT/PGT 2026

Find the output of the following code of Python.

def MessageGame(Msg, Nums):
    Msg = Msg + "!"
    Nums.append(100)
    print("Func Msg:", Msg)      # Output 1A
    print("Func List:", Nums)    # Output 1B
Text = "Hello"
MyList = [10, 20]
MessageGame(Text, MyList)
print("Final Msg:", Text)       # Output 1C
print("Final List:", MyList)    # Output 1D

Attempted by 22 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…