25 Basic Python Objective Questions

25 Basic Python Objective Questions

Assessment

Quiz

Information Technology (IT)

Professional Development

Hard

Created by

shubhangi padole

FREE Resource

Student preview

quiz-placeholder

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

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?