Monday, October 10, 2022

Class 12 CS Assignment

 1. Given the list L = [1, 3, 6, 82, 5, 7, 11, 92], What will be the output of print(L[-2:-5:-2])

(a) Empty List

(b) [11, 5]

(c) [82, 7]

(d) None of these

2. Find and write the output of the following Python Code.

a=10

def show():

    global a

    a=15

    b=20

    print(a)

show()

(a) Error

(b) 10

(c) 15

(d) None of these



No comments:

Post a Comment