Post Test Quiz PPL 01-13102023

Post Test Quiz PPL 01-13102023

University

20 Qs

quiz-placeholder

Similar activities

Structures and union

Structures and union

University

15 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

tik kelas 7

tik kelas 7

1st Grade - University

15 Qs

CSS Pseudo dan CSS Grid System

CSS Pseudo dan CSS Grid System

University

20 Qs

POST TEST WEB STATIC

POST TEST WEB STATIC

University - Professional Development

20 Qs

switch case

switch case

University

17 Qs

Evaluasi Python Tuple

Evaluasi Python Tuple

University

20 Qs

Google SketchUp Tool

Google SketchUp Tool

KG - University

20 Qs

Post Test Quiz PPL 01-13102023

Post Test Quiz PPL 01-13102023

Assessment

Quiz

Computers

University

Hard

Created by

Muhammad Koprawi

FREE Resource

AI

Enhance your content

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Which of the following is not a valid way to define this dictionary in Python:

d = dict([

('foo', 100),

('bar', 200),

('baz', 300)

])

d = {}

d['foo'] = 100

d['bar'] = 200

d['baz'] = 300

d = dict(foo=100, bar=200, baz=300)

d = {'foo': 100, 'bar': 200, 'baz': 300}

d = { ('foo', 100), ('bar', 200), ('baz', 300) }

2.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

You have the following dictionary definition:


d = {'foo': 100, 'bar': 200, 'baz': 300}


What method call will delete the entry whose value is 200?

delete d('bar')

d.pop("bar")

d.remove("bar")

None of the above

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

What would be the output of the following code snippet?


a_dict = {'color': 'blue', 'fruit': 'apple', 'pet': 'dog'}


for key in a_dict:

print(key)

'blue'

'apple'

'dog'

color

fruit

pet

blue

apple

dog

'color'

'fruit'

'pet'

4.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Consider the following statement:


If you just need to work with the keys of a dictionary, then you can use .keys(), which is a method that returns a new view object containing the dictionary’s keys.


Is this statement True or False?

False

True

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the program above

e

y

t

g

6.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

The output of the code above is

[101, 102, 103, 104]

[3.6, 3.7, 3.8, 4]

7.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the code above

[3.6, 3.7, 3.8, 4]

[101, 102, 103, 104]

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?