Search Header Logo

Python Quiz -7 Summer Internship

Authored by Gnaneshwar Reddy

Professional Development

Professional Development

Used 2+ times

Python Quiz -7 Summer Internship
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  • A. list = {}

B. list = ()

  • C. list = []

  • D. list = <>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  • A. my_list(0)

  • B. my_list[0]

  • C. my_list{0}

  • D. my_list<0>

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  • A. 3

  • B. 4

  • C. 5

  • D. Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  • A. numbers.append(5)

  • B. numbers.add(5)

  • C. numbers.insert(5)

  • D. numbers.extend(5)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to remove the last element from a list named items?

  • A. items.delete()

  • B. items.remove()

  • C. items.pop()

  • D. items.clear()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  • A. [1, 2, 3, 4, 5, 6]

  • B. [[1, 2, 3], [4, 5, 6]]

  • C. [1, 2, 3, [4, 5, 6]]

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

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

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

  • B. [2, 4, 6]

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

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Professional Development