Search Header Logo

Python Complete course test

Authored by Gali Venkatesh

Computers

University

Used 2+ times

Python Complete course test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following is a data type in Python? Select multiple answers.

int

words

string

decimals

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following create an empty dictionary (D)?

D = dict()

D = ()

D = []

D = {}

3.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

A dictionary is an example of a sequence ...

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

d["john"]

a) 40

b) 45

c) “john”

d) “peter”

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose list1 is [2445,133,12454,123], what is max(list1)?

a) 2445

b) 133

c) 12454

d) 123

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python statement?

>>>"abcd"[2:]

a) a

b) ab

c) cd

d) dc

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a=(1,2,3,4), a[1:-1] is _________

a) Error, tuple slicing doesn’t exist

b) [2,3]

c) (2,3,4)

d) (2,3)

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?