Search Header Logo

Python Training

Authored by Devanjali Relan

Computers

University

Used 2+ times

Python Training
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Set is:

Mutable

Distinct

Unordered

Sorted

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

s={1,2,3}

s[0]=10

print(s)

{10,2,3}

{1,2,10}

{1,2,3}

TypeError

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

111

123

321

Runtime error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is mutable?

List

String

Tuple

Set

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

nums=list({1:'one',2:'two'})

print(nums)

Syntex error

[1, 2]

[‘one', ‘two']

Runtime error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an invalid list object?

list(“Hello”)

[10, 1.234. 2+3j, ‘Python']

[(1,2), (3,4)]

All are valid

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If ['one', 'four', 'three', 'two'] is a list object, the sort() function will return _____.

['four', 'three', 'two', 'one']

['four', 'one', 'three', 'two']

['one', 'two', 'three', 'four']

None of the above

Access all questions and much more by creating a free account

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

Already have an account?

Discover more resources for Computers