Search Header Logo

class11 dict ,list and loops

Authored by Vijayalakshmi Kavoor

Computers

11th Grade

Used 3+ times

class11 dict ,list and loops
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

l = [5] * 10

print(len(l))

10

error

none

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

List1 = [4, 8, 12, 16]

List1[1:4] = [20, 24, 28]

print(List1)

[4, 20, 24]

Error

[4, 20, 24, 28]

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

List = [10, 20, 30, 40, 50]

List.append(60)

print(List)


List.append(60)

print(List)

[10, 20, 30, 40, 50, 60]

[10, 20, 30, 40, 50, 60, 60]

[10, 20, 30, 40, 50, 60]

[10, 20, 30, 40, 50, 60]

[60,10, 20, 30, 40, 50]

[60,60,10, 20, 30, 40, 50]

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Select all the correct options to copy a list

aList = ['a', 'b', 'c', 'd']

newList = copy(aList)

newList = aList.copy()

newList.copy(aList)

newList = list(aList)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q:Predict the output of the following

for a in range(1,6):

if(a%2==0):

break

print(a)

else:

print("loop over")

2

4

1

2

4

loop over

1

loop over

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Write the output

aList = [1, 2, 3, 4, 5, 6, 7]

pow2 = [2 * x for x in aList]

print(pow2)

[2, 4, 6, 8, 10, 12, 14]

[1, 2, 3, 4, 5, 6, 7]

Error

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code

aList = ["PYnative", [4, 8, 12, 16]]

print(aList[0][1])

print(aList[1][3])

P 8

Y 16

P

12

Y

16

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers