NRIT_Python_Quiz-01

NRIT_Python_Quiz-01

University

30 Qs

quiz-placeholder

Similar activities

Python Pandas Quiz

Python Pandas Quiz

University

26 Qs

Operators and Data types

Operators and Data types

University

32 Qs

Internship on "ML & DL using Python"

Internship on "ML & DL using Python"

University

35 Qs

Python-предметная олимпиада по программированию

Python-предметная олимпиада по программированию

University

30 Qs

Programming Q3 Review - Data Structures

Programming Q3 Review - Data Structures

9th Grade - University

30 Qs

Reckon your Techie Quiz - Day 2 - Python (23.08.22)

Reckon your Techie Quiz - Day 2 - Python (23.08.22)

University

25 Qs

Script_programming_test

Script_programming_test

University

25 Qs

Python Programming Quiz

Python Programming Quiz

University

25 Qs

NRIT_Python_Quiz-01

NRIT_Python_Quiz-01

Assessment

Quiz

Computers

University

Medium

Created by

Yohoshiva Basaraboyina

Used 2+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create an empty list in Python?

list = ()

list = []

list = {}

list = None

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods can be used to add an element to a list in Python?

list.insert(index, element)

list.append(element)

list.add(element)

All of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: print(type([]))?

<class 'list'>

<class 'tuple'>

<class 'dict'>

<class 'set'>

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you remove the last item from a list in Python?

list.remove()

list.pop()

del list[-1]

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the second element of a list my_list = [10, 20, 30, 40]?

my_list(1)

my_list[1]

my_list{1}

my_list[2]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of print(len([1, 2, 3, 4]))?

3

4

5

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove the last element of a list?

list.remove(-1)

list.pop()

del list[-1]

Both (b) and (c)

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?