python set 1

python set 1

University

10 Qs

quiz-placeholder

Similar activities

Greetings

Greetings

KG - University

10 Qs

Teaching as Vocation and Profession

Teaching as Vocation and Profession

University

10 Qs

Usahatani Faktor Modal

Usahatani Faktor Modal

University

11 Qs

Koperasi dan sekitarnya

Koperasi dan sekitarnya

University

10 Qs

environmental education

environmental education

University

10 Qs

GLS290 Aerial Camera

GLS290 Aerial Camera

University

10 Qs

CCHU5001_Week 3_Quiz

CCHU5001_Week 3_Quiz

University

10 Qs

Project mc²

Project mc²

2nd Grade - Professional Development

11 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

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?