python set 1

python set 1

University

10 Qs

quiz-placeholder

Similar activities

Business Ethics

Business Ethics

University

10 Qs

BAC1054 Process Costing

BAC1054 Process Costing

University

15 Qs

UK Knowledge Test

UK Knowledge Test

University

10 Qs

BCSI AWARENESS

BCSI AWARENESS

KG - Professional Development

15 Qs

DS

DS

University

8 Qs

Test Development

Test Development

University

10 Qs

Basic First Aid Quiz

Basic First Aid Quiz

12th Grade - University

15 Qs

Culture Workshop

Culture Workshop

KG - Professional Development

10 Qs

python set 1

python set 1

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

ESPARK 2023

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Amongst which of the following if syntax is true?

if condition: #Will executes this block if the condition is true

if condition { #Will executes this block if the condition is true }

if(condition) #Will executes this block if the condition is true

None of the mentioned above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is not a keyword in Python language?

eval

assert

nonlocal

pass

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What arithmetic operators cannot be used with strings in Python?

*

+

All of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the definition for packages in Python

A set of programs making use of Python modules

A set of main modules

A folder of python modules

A set of programs making use of Python modules

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

a = [1, 2, 3, 4]

b = [3, 4, 5, 6]

c = [x for x in a if x not in b]

print(c)

[1,2]

[5,6]

[1,2,5,6]

[3,4]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

a = [[], "abc", [0], 1, 0]

print(list(filter(bool, a)))

[abc]

['abc',[0],1]

[1]

none of above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet?

pYHON PrOgRaMmInG

Python Programming:

PYTHON PROGRAMMING

python programming

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?