Python Programming Quiz

Python Programming Quiz

University

15 Qs

quiz-placeholder

Similar activities

Fundamental of Python

Fundamental of Python

University

10 Qs

Python Programming

Python Programming

University

10 Qs

Python Day-5

Python Day-5

University

15 Qs

Post Test #4 - Python Fundamental #3

Post Test #4 - Python Fundamental #3

University

10 Qs

AI BootCamp: 2024 Edition- Session 1

AI BootCamp: 2024 Edition- Session 1

University

20 Qs

OOPS quiz-1 PYTHON

OOPS quiz-1 PYTHON

University

19 Qs

CSE 102 Exam 3 Practice

CSE 102 Exam 3 Practice

University

18 Qs

4-字典与集合

4-字典与集合

University

10 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

University

Hard

Created by

ABINAYA 2022-2026

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you find the number of elements in a tuple named `my_tuple`?

my_tuple.size()

length(my_tuple)

my_tuple.length()

len(my_tuple)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the value associated with the key `'name'` in a dictionary named `person`?

person['name']

person.get('name')

person['name']

    and person.get('name')

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to find the index of an element in a tuple?

find()

index()

locate()

search()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you find the length of a list named `items`?

len(items)

items.size()

items.length()

length(items)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list named `fruits`?

fruits[0]

fruits[1]

fruits[first]

fruits.get(0)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add the element `5` to the end of a list named `numbers`?

numbers.add(5)

numbers.append(5)

numbers.insert(5)

numbers.extend(5)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns a list of all keys in a dictionary named `person`?

person.keys()

person.all_keys()

person.get_keys()

person.list_keys()

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?