12th Class Computers Science Sample Paper Python Revision Tour-Sample Paper-2

  • question_answer
    What will be the output of the given statement. print("Study"[1])

    A) Study               

    B) S

    C) t     

    D) Generate Error

    Correct Answer: C

    Solution :

    [c] When you print a string with a number in square brackets, then it will take this number as an index of that string and print only that character, i.e., in this question ''Study'', it is a string and you will print [1] inside print function, then it will only print ‘'t’' which lies at 1 index in this string.            


You need to login to perform this action.
You will be redirected in 3 sec spinner