untitled

untitled

12th Grade

15 Qs

quiz-placeholder

Similar activities

April Revision APCSP

April Revision APCSP

12th Grade

17 Qs

Python

Python

University

20 Qs

ArrayLists

ArrayLists

11th - 12th Grade

10 Qs

Python Lists Dictionaries Tuple Set

Python Lists Dictionaries Tuple Set

12th Grade

10 Qs

untitled

untitled

8th Grade - University

11 Qs

Python Lists and Tuples

Python Lists and Tuples

University

11 Qs

Python Quiz - BPLCK105B

Python Quiz - BPLCK105B

University

20 Qs

Gateway Level 3 Python Quiz 2

Gateway Level 3 Python Quiz 2

9th - 12th Grade

20 Qs

untitled

untitled

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Bhoomika Anand

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

`list = (1, 2, 3)`

`list = [1, 2, 3]`

`list = {1, 2, 3}`

`list = <1, 2, 3>`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you access the third element in a list named `my_list`?

`my_list[2]`

`my_list[3]`

`my_list[1]`

`my_list[-1]`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to add an element to the end of a list in Python?

`list.add()`

`list.append()`

`list.insert()`

`list.extend()`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? ```python my_list = [1, 2, 3] my_list.append(4) print(my_list) ```

`[1, 2, 3]`

`[1, 2, 3, 4]`

`[4, 1, 2, 3]`

`[1, 2, 3, 4, 4]`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove the element at index 2 from a list named `my_list`?

`my_list.remove(2)`

`my_list.pop(2)`

`my_list.delete(2)`

`my_list.clear(2)`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of the following code? ```python my_list = [10, 20, 30, 40] print(my_list[1:3]) ```

`[10, 20, 30]`

`[20, 30]`

`[20, 30, 40]`

`[30, 40]`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements will create a list of numbers from 0 to 9?

`list(range(0, 10))`

`list(range(1, 10))`

`list(range(0, 9))`

`list(range(1, 9))`

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?