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

Home » Python » Python Objective Questions

Python Objective Questions - 46


Question: 1

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

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


Question: 2

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

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


Question: 3

(A) Yes
(B) No

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


Question: 4

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

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


Question: 5

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

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


Question: 6

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

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


Question: 7

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

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


Question: 8

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

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


Question: 9

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

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


Question: 10

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

Forum
Practionar other[Posted by: Admin | Chicago, USA]


Question: 11

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

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


Question: 12

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

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


Question: 13

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

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


Question: 14

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

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


Question: 15

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

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


Question: 16

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

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


Question: 17

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

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


Question: 18

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

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


Question: 19

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

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


Question: 20

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


Question: 21

Forum
Practionar other[Posted by: Admin | Chicago, USA]


Question: 22

Forum
Practionar arrays[Posted by: Admin | Chicago, USA]


Question: 23

Forum
Practionar other[Posted by: Admin | Chicago, USA]


Question: 24

(A) 32 characters
(B) 63 characters
(C) 79 characters
(D) None of the above

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


Question: 25

(A) abc = 1,000,000
(B) a b c = 1000 2000 3000
(C) a,b,c = 1000, 2000, 3000
(D) a_b_c = 1,000,000

Forum
Expert variables[Posted by: Admin | Chicago, USA]


Question: 26

(A) Error
(B) 25
(C) None
(D) 2

Forum
Practionar arrays[Posted by: Admin | Chicago, USA]


Question: 27

(A) outfile = open(file = “c:cppbuzz.txt”, “o”)
(B) outfile = open(“c:cppbuzz.txt”, “r”)
(C) outfile = open(“c:cppbuzz.txt”, “w”)
(D) outfile = open(“c:cppbuzz.txt”, “r”)

Forum
Practionar filehandling[Posted by: Admin | Chicago, USA]


Question: 28

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


Question: 29

(A) “%d/%m/%Y”
(B) “%d/%M/%y”
(C) “%D/%M/%Y”
(D) “%d/%m/%y”

Forum
Practionar regularexpressions[Posted by: Admin | Chicago, USA]


Question: 30

(A) Class
(B) List
(C) Dictionary
(D) Tuple

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


Question: 31

(A) 13
(B) 2
(C) 15
(D) None of these

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


Question: 32

(A) 0
(B) 1
(C) 2
(D) 0.5

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


Question: 33

(A) uzz
(B) cpp
(C) buzz
(D) cppb

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


Question: 34

(A) Yes
(B) No

Forum
Practionar methods[Posted by: Admin | Chicago, USA]


Question: 35

(A) Tuple
(B) Array
(C) Dictionary
(D) List

Forum
Practionar variables[Posted by: Admin | Chicago, USA]


Question: 36

(A) Class
(B) List
(C) Tuple
(D) Dictionary

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


Question: 37

(A) print('cppbuzz-' + 'chicago');
(B) print('cppbuzz' + '-chicago');
(C) print('cppbuzz' + '-' + 'chicago');
(D) All of the above

Forum
Beginner operators[Posted by: Admin | Chicago, USA]


Question: 38

(A) //
(B) %
(C) /
(D) None of the above

Forum
Beginner operators[Posted by: Admin | Chicago, USA]


Question: 39

(A) 17
(B) 2
(C) 0
(D) None of these

Forum
Beginner operators[Posted by: Admin | Chicago, USA]


Question: 40

(A) Depends on operators
(B) Left to Right
(C) Right to Left
(D) Depends on Python Compiler

Forum
Beginner operators[Posted by: Admin | Chicago, USA]


Question: 41

(A) +
(B) /
(C) -
(D) ()

Forum
Beginner operators[Posted by: Admin | Chicago, USA]


Question: 42

(A) Yes
(B) No
(C) Depends on Python Version

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


Question: 43

(A) __str
(B) __str
(C) _str_
(D) None of these

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


Question: 44

(A) type(name)
(B) print(type(name))
(C) print(name)
(D) type()

Forum
Beginner variables[Posted by: Mayank Patel | Des Moines, IA]


Question: 45

(A) Hello World
(B) hello World
(C) <class 'str'>
(D) str

Forum
Practionar variables[Posted by: Mayank Patel | Des Moines, IA]


Question: 46

(A) Yes
(B) No

Forum
Beginner other[Posted by: Mayank Patel | Des Moines, IA]



[Contribute Here]

Python Cheat Sheet