Search Header Logo

25 Basic Python Objective Questions

Authored by shubhangi padole

Information Technology (IT)

Professional Development

25 Basic Python Objective Questions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of `print(type([1, 2, 3]))`?

list

tuple

dict

str

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to start a block of code in Python?

{}

[]

:

()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of `print("Python"[-1])`?

P

n

o

h

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method can be used to convert all characters of a string to uppercase?

upper()

uppercase()

to_upper()

capitalize()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of `print(4 % 2)`?

2

1

0

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be used to iterate over the elements of a list?

for

while

if

Both a and b

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of `3 + 5 * 2` in Python?

13

16

10

8

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?