Python basics

Python basics

University

20 Qs

quiz-placeholder

Similar activities

Code-O-Fiesta Round 1

Code-O-Fiesta Round 1

University

15 Qs

Python Programming II CSE A

Python Programming II CSE A

12th Grade - University

20 Qs

Computational Thinking in Python[Quiz 2]

Computational Thinking in Python[Quiz 2]

University

15 Qs

loops and iterables in python

loops and iterables in python

University

20 Qs

Quizaro

Quizaro

University

20 Qs

Quiz 2

Quiz 2

University

25 Qs

Python Files

Python Files

University

20 Qs

Python Quiz (Basics,List,Tuple)

Python Quiz (Basics,List,Tuple)

University

15 Qs

Python basics

Python basics

Assessment

Quiz

Computers

University

Medium

Created by

Jayasheela Kallaganiger

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an immutable data type in Python?

List

Dictionary

Tuple

Set

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type in Python is ordered and allows duplicate elements?

List

Tuple

Set

Dictionary

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a dictionary in Python?

{1: 'apple', 2: 'banana', 3: 'orange'}

[1: 'apple', 2: 'banana', 3: 'orange']

(1: 'apple', 2: 'banana', 3: 'orange')

{1, 'apple', 2, 'banana', 3, 'orange'}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'in' operator do in Python?

Checks if a value exists in a list

Performs integer division

Checks if a key exists in a dictionary

Checks if a value exists in a tuple

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type in Python is used to store a sequence of characters?

Integer

List

Tuple

String

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

my_tuple = (1, 2, 3)

print(my_tuple[1])

1

2

3

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data types in Python is unordered and does not allow duplicate elements?

Set

Tuple

List

Dictionary

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?