Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Python » Python Objective Questions

Python Objective Questions - Set 1

Set 1 of 3


Question: 1

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]


Question: 2

(A) List is mutable && Tuple is immutable
(B) List is immutable && Tuple is mutable
(C) Both are Immutable
(D) Both are Mutable.

Level: Beginner Category: variables
[Posted by: Shani pratap singh | Pune]


Question: 3

(A) b
(B) syntax error
(C) c
(D) b+1

Level: Beginner Category: other
[Posted by: Harshit Gupta | Allahabad,India]


Question: 4

(A) list
(B) bool
(C) int
(D) str

Level: Beginner Category: methods
[Posted by: Harshit Gupta | Allahabad,India]


Question: 5

(A) list
(B) bool
(C) int
(D) str

Level: Beginner Category: variables
[Posted by: Harshit Gupta | Allahabad,India]


Question: 6

(A) Hello World
(B) Compilation Error
(C) Bye World
(D) Ambiguity

Level: Beginner Category: variables
[Posted by: Harshit Gupta | Allahabad,India]


Question: 7

(A) a
(B) b
(C) c
(D) d

Level: Beginner Category: variables
[Posted by: Harshit Gupta | Allahabad,India]


Question: 8

(A) 4.3
(B) 4.0
(C) 4
(D) compilation error

Level: Beginner Category: operators
[Posted by: Harshit Gupta | Allahabad,India]


Question: 9

(A) cpp-buzz
(B) cppbuzz
(C) TypeError: unsupported operand
(D) None of the above

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]


Question: 10

(A) a+b
(B) a+''+b
(C) a+""+b
(D) All of the above

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]


Question: 11

(A) listA = listB[]
(B) listA = listB[:]
(C) listA = listB[]()
(D) listA = listB

Level: Practitioner Category: other
[Posted by: Admin | Chicago, USA]


Question: 12

(A) bikes[0]
(B) bikes[-1]
(C) bikes[lpos]
(D) bikes[:-1]

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]


Question: 13

(A) def __init__()
(B) def _init_()
(C) _init_()
(D) All of these

Level: Beginner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 14

(A) pbuzz
(B) buzzc
(C) bu
(D) None of these

Level: Beginner Category: methods
[Posted by: Admin | Chicago, USA]


Question: 15

(A) length()
(B) len()
(C) strlen()
(D) stringlength()

Level: Beginner Category: methods
[Posted by: Admin | Chicago, USA]


Question: 16

(A) fruit = 'banana'
(B) fruit = "banana"
(C) fruit = banana
(D) fruit = (banana)

Level: Beginner Category: variables
[Posted by: Admin | Chicago, USA]


Question: 17

(A) function
(B) def
(C) method
(D) All of these

Level: Beginner Category: methods
[Posted by: Admin | Chicago, USA]


Question: 18

(A) Yes
(B) No

Level: Beginner Category: conditional
[Posted by: Admin | Chicago, USA]


Question: 19

(A) //
(B) ''
(C) /**/
(D) #

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]


Question: 20

(A) else
(B) import
(C) raise
(D) All of these

Level: Beginner Category: other
[Posted by: Admin | Chicago, USA]



Test Your Python Skills Python Cheat Sheet