Question 3
Consider the following Python code. What will be the output?s = "programming" print(s[::-1].replace("g", "#"))
#nimmarrop#
#nimmar#orp
programmin#
gni#marropg
Consider the following Python code. What will be the output?s = "programming" print(s[::-1].replace("g", "#"))
#nimmarrop#
#nimmar#orp
programmin#
gni#marropg
Correct answer
#nimmar#orp
Question 3 of 18 in the IIT Madras BS Programming in Python (Python) Quiz 1 paper sat on 26 Oct 2025, in the September 2025 term (IIT M IMPROVEMENT AN EXAM QIA4 26 Oct). It carries 3 marks.