In Sanskrit “Vasudhaiva Kutumbakam” means “The world is one family”. The…

PYQ EMRS TGT/PGT (ESSE) 2025

In Sanskrit “Vasudhaiva Kutumbakam” means “The world is one family”. The following Python program generates an encrypted code of this quote. Carefully analyze the program and determine the output produced during program execution by answering the questions that follow.

Quote = "Vasudhaiva Kutumbakam"

L = len(Quote)
Code = ""

for i in range(0, L):
    if (Quote[i] >= 'a' and Quote[i] <= 'k'):
        Code = Code + Quote[i].upper()
    elif (Quote[i] >= 'n' and Quote[i] <= 'z'):
        Code = Code + Quote[i-1]
    elif (Quote[i].isupper()):
        Code = Code + Quote[i].lower()
    else:
        Code = Code + '@'

print(Code)

(A) What encrypted code will be generated for the substring “Vasudha” in the output?

(B) What encrypted code will be generated in the output for the substring “iva”?

(C) What encrypted code will be generated in the output for the blank space between “Vasudhaiva” and “Kutumbakam”?

(D) What encrypted code will be generated for the substring “Kutumbakam” in the output?

Attempted by 61 students.

Sign up free to check your answer

Sign up free

Explore the full course: Emrs Cs Tier 2

Loading lesson…