Python Quiz 6

Python Quiz 6

University

70 Qs

quiz-placeholder

Similar activities

IT Fundamentals PE

IT Fundamentals PE

University

70 Qs

Компьютерные игры

Компьютерные игры

5th Grade - University

66 Qs

Cyber security class test 3

Cyber security class test 3

University

70 Qs

CS Study Guide ALL

CS Study Guide ALL

12th Grade - University

74 Qs

PRETEST 10

PRETEST 10

10th Grade - University

74 Qs

MUITICT_09_test

MUITICT_09_test

University

75 Qs

CompTIA A+ 220-1001 Chapter 9 - 12

CompTIA A+ 220-1001 Chapter 9 - 12

University

71 Qs

Internet,  Email & Web designing

Internet, Email & Web designing

University

66 Qs

Python Quiz 6

Python Quiz 6

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Nguyen Duong

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

70 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? b=[2,3,4,5] a=list(filter(lambda x:x%2,b)) print(a)

[2,4]

[]

[3,5]

Invalid arguments for filter function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? lst=[3,4,6,1,2] lst[1:2]=[7,8] print(lst)

[3, 7, 8, 6, 1, 2]

Syntax error

[3,[7,8],6,1,2]

[3,4,6,7,8]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? a=[1,2,3] b=a.append(4) print(a) print(b)

[1,2,3,4]

[1,2,3,4]

Syntax error

[1,2,3]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? >>> a=[14,52,7] >>>> b=a.copy() >>> b is a

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? a=[13,56,17] a.append([87]) a.extend([45,67]) print(a)

[13, 56, 17, [87], 45, 67]

[13, 56, 17, 87, 45, 67]

[13, 56, 17, 87,[ 45, 67]]

[13, 56, 17, [87], [45, 67]]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following piece of code? a=list((45,)*4) print((45)*4) print(a)

180

[(45),(45),(45),(45)]

(45,45,45,45)

[45,45,45,45]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? lst=[[1,2],[3,4]] print(sum(lst,[]))

[3],[7]

[1,2,3,4]

Error

[10]

Create a free account and access millions of resources

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?