Find the output of the following Python Code: def FruitMob(): stock =…

PYQ KVS TGT/PGT 2026

Find the output of the following Python Code:

def FruitMob():
    stock = {"Apple": 50, "Banana": 20}
    info = ("Fruit", "Inventory")
    # Update dictionary
    stock["Apple"] = stock["Apple"] - 10
    stock["Orange"] = 30
    # Loop and logic
    for key in sorted(stock.keys()):
        if stock[key] > 25:
            print(key, ":", "High")
        else:
            print(key, ":", "Low")
    print("Category:", info[0])
FruitMob()

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…