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

  • question_answer
    Read the following statements, and find the output:  
     

    A) [12, 7, 5, 16, 28, 4, 30, 25]    

    B) [12, 7, 5, 16, 28, 4, 30, 25]

    C) Generate Error      

    D) None of the above

    Correct Answer: A

    Solution :

    [a] Dry run:- As per the above dry run, element of list swaps with its adjacent element and in for loop the step value is 2. So, the final list is [12, 7, 5, 16, 28, 4, 30, 25


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