python set 1

python set 1

University

10 Qs

quiz-placeholder

Similar activities

Praktisi Mengajar - Java Test

Praktisi Mengajar - Java Test

University

10 Qs

C Programming First Quiz - Sec H

C Programming First Quiz - Sec H

University

10 Qs

Predict The Output

Predict The Output

University

15 Qs

Intro to Python Programming Quiz 9D

Intro to Python Programming Quiz 9D

1st Grade - University

14 Qs

BASICS OF MECHATRONICS

BASICS OF MECHATRONICS

University

10 Qs

CS201: Chapter 1

CS201: Chapter 1

University

12 Qs

PYTHON BASICS

PYTHON BASICS

University

7 Qs

PYTHON set4

PYTHON set4

University

10 Qs

python set 1

python set 1

Assessment

Quiz

Other

University

Hard

Created by

ESPARK 2023

Used 6+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?