Python Test 25 List Tuple Dictionary

Python Test 25 List Tuple Dictionary

Professional Development

70 Qs

quiz-placeholder

Similar activities

Python  basics

Python basics

Professional Development

67 Qs

TIK - CTS

TIK - CTS

Professional Development

73 Qs

Repaso final Python

Repaso final Python

Professional Development

71 Qs

JavaScript

JavaScript

Professional Development

70 Qs

GraySchools HTML Quiz

GraySchools HTML Quiz

Professional Development

69 Qs

Programación y Estructuras de Datos - Postest

Programación y Estructuras de Datos - Postest

Professional Development

75 Qs

eInfochips

eInfochips

Professional Development

71 Qs

Java Fundamentals

Java Fundamentals

Professional Development

70 Qs

Python Test 25 List Tuple Dictionary

Python Test 25 List Tuple Dictionary

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

ram lovewanshi

Used 43+ times

FREE Resource

AI

Enhance your content in a minute

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

70 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following creates a tuple?

tuple1=("a","b")

tuple1[2]=("a","b")

tuple1=(5)*2

None of the above

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Choose the correct option with respect to Python.

Both tuples and lists are immutable.

Tuples are immutable while lists are mutable.

Both tuples and lists are mutable.

Tuples are mutable while lists are immutable.

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

colors = ["red", "green", "burnt sienna", "blue"]

print(colors[2])


What is the output of the above python code?

'blue'

It causes a run-time error.

'burnt sienna'

'green'

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

colors = ["red", "green", "burnt sienna", "blue"]


Which list index would select the value 'red' from the above list?

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

colors = ("red", "green", "burnt sienna", "blue")


print("yellow" in colors)


What is the result of the yellow in colors expression?

ValueError: 'yellow' is not in list

4

False

True

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What’s the main difference between Python lists and tuples?

Lists can hold any data type and tuples can only contain int and str objects.

Lists are immutable and tuples are mutable.

Lists are mutable and tuples are immutable.

Lists are faster and tuples are slower.

Check Your Answer »

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output?

var1=['sam', "Pam", 12,44]

var1[3]="Ram"

print(var1)

['sam', 'Pam', 12, 44]

['sam', 'Pam', 12, 'Ram']

It will give an error

['sam', 'Pam', 'Ram',44]

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?