RL Python Basics Quiz 2

RL Python Basics Quiz 2

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

String Quiz

String Quiz

9th - 12th Grade

15 Qs

MOAC Excel 2016 Lesson 7

MOAC Excel 2016 Lesson 7

8th - 12th Grade

10 Qs

Python Basics

Python Basics

12th Grade - University

10 Qs

Introduction to Python Programming

Introduction to Python Programming

7th - 9th Grade

10 Qs

python A

python A

10th Grade

13 Qs

MS Powerpoint Quiz

MS Powerpoint Quiz

9th Grade

13 Qs

Python set

Python set

10th Grade

12 Qs

Python Certified Specialist

Python Certified Specialist

12th Grade

15 Qs

RL Python Basics Quiz 2

RL Python Basics Quiz 2

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Aahnik Daw

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

string = "Python is awesome"

string[9:3:-1]

' si no'

' '

' si noh'

'i no'

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

my_dict = {

"apple": 5,

"banana": 10,

"brinjal": 30

}

my_dict.items() will give ?

all the values

all the keys

the entire dictionary

tuple of key value pairs

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How can I delete all the items from a set in python ?

my_set = {1,2,3,4,5,6}

my_set.clear()

for item in my_set:
  my_set.remove(item)
for item in my_set:
  my_set.discard(item)
my_set.discard()

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

s1 = {3,4,5,6}
s2 = {2,3,9,6,12}
s1.intersection(s2)

{3, 6}

{2,3,6}

{5,9,6}

{3,4,5,6}

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Find the elements in set a that are not in set b

a - b

a.union(b)

a.intersection(b)

a.symmetric_difference(b)

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

a = {1,2,3,4,5}
b = {2,3,4,9 , 10}
c = {6,7,8,9}

print(a.isdisjoint(b))
print(b.isdisjoint(c))
print(a.isdisjoint(c))

False

False

True

True

False

False

False

True

False

False

True

True

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

a = {1,2,3,4,5,10}
b = {2,3,4,9 , 10}
c = {6,7,8,9}

print((a-b).issubset(a))
print(a.issubset(b))
print(b.issuperset(c))
print(a.symmetric_difference(c).issuperset(b))

True

False

False

True

False

False

False

True

False

True

False

True

True

True

False

False

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?