MODULE 3_Python

MODULE 3_Python

Professional Development

13 Qs

quiz-placeholder

Similar activities

Basic Python

Basic Python

Professional Development

10 Qs

Python

Python

University - Professional Development

10 Qs

Javascript basics

Javascript basics

Professional Development

15 Qs

PST Using C Part1

PST Using C Part1

Professional Development

10 Qs

Entrada e Saída de Dados e Variáveis

Entrada e Saída de Dados e Variáveis

Professional Development

15 Qs

DECI - Week 6 - round

DECI - Week 6 - round

Professional Development

12 Qs

Uso de try, except, finally y raise en Python

Uso de try, except, finally y raise en Python

Professional Development

12 Qs

Hàm

Hàm

Professional Development

10 Qs

MODULE 3_Python

MODULE 3_Python

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Sumathi K

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to add a new key-value pair to a Python dictionary?

add()

insert()

append()

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following Python code snippet?

[‘a’, ‘b’, ‘c’]

(‘a’, ‘b’, ‘c’)

dict_keys([‘a’, ‘b’, ‘c’])

{‘a’, ‘b’, ‘c’}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following Python code snippet?

(‘a’, 1), (‘b’, 2), (‘c’, 3)]

((‘a’, 1), (‘b’, 2), (‘c’, 3))

dict_items([(‘a’, 1), (‘b’, 2), (‘c’, 3)])

{(‘a’, 1), (‘b’, 2), (‘c’, 3)}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to add an element to the end of a list in Python?

append()

add()

insert()

extend()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following Python code snippet?

[3, 4]

2, 3, 4]

[1, 2, 3]

[4, 5]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the following Python code snippet do?

Prints “Hello, World!” in lowercase

Converts “Hello, World!” to uppercase and prints it

Reverses the string “Hello, World!”

Removes all whitespace characters from the string “Hello, World!

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the isupper() method return if all characters in a string are uppercase?

True

False

1

Error

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?