Python Quiz

Python Quiz

Professional Development

11 Qs

quiz-placeholder

Similar activities

PYTHON QUIZ3

PYTHON QUIZ3

University - Professional Development

10 Qs

Tethys Basics

Tethys Basics

Professional Development

10 Qs

ВебДиз4

ВебДиз4

Professional Development

11 Qs

Python quiz

Python quiz

University - Professional Development

10 Qs

Variable Scope in Python

Variable Scope in Python

1st Grade - Professional Development

15 Qs

Funciones y Variables

Funciones y Variables

Professional Development

10 Qs

CSE-C1-Quiz-8-25-11-2022

CSE-C1-Quiz-8-25-11-2022

Professional Development

8 Qs

PythonTest

PythonTest

6th Grade - Professional Development

11 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Glenson Rodrigues

Used 23+ times

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • 1. Which of the following would give an error?

  • A. list1=[]

  • B. list1=[]*3

  • C. list1=[2,8,7]

  • D. None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • 2.Which of the following is True regarding lists in Python?

  • A. Lists are immutable.

  • B. size(list1) command is used to find the size of lists.

  • C. Size of the lists must be specified before its initialization

  • D. Elements of lists are stored in contagious memory location.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • 3. Suppose l is [1, 3, 2], What is l * 2?

  • A. [2, 6, 4]

  • B. [1, 3, 2, 1, 3]

  • C. [1, 3, 2, 1, 3, 2]

  • D. [1, 3, 2, 3, 2, 1]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • 4. Suppose list1 is [1, 5, 9], what is sum(list1) ?

A. 1

B. 9

C. 15

D. Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. Which of the following will give output as [23,2,9,75] ?
If l=[6,23,3,2,0,9,8,75]

  • A. l[1:7:2]

  • B. l[0:7:2]

  • C. l[1:8:2]

  • D. l[0:8:2]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. What will be the output of the following Python code?
>>>l1 = [11, 2, 23]
>>>l2 = [11, 2, 2]
>>>l1 < l2

A. True

B. False

C. Error

D. None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. In Python, list is mutable

A. True

B. False

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?