Python Online Test || M3-R5 Python Most Important Questions 


python mcqs question and aswers


1 . Which is the correct operator for pow(x,y)?

a) X^y

b) X**y

c) X^^y

d) None of the mentioned

 

 
2. What would be value of j after the following is executed?

k=17

j=6

if (k < 10):

    j=8

j=j+1

j=j+2

print(j)

 

A) 8

B) 9

C) 7

D) 10

 

 
3 . What is the return type of function id?

a) int
b) float
c) bool
d) dict

 

 

4 . Which of the following can not be used as identifiers?

A) Letters

B) Digits

C) Underscores

D) Spaces

 

 

5. Which of these in not a core data type?

a) Lists
b) Dictionary
c) Tuples
d) Class

 

 

6. What is the type of inf?

a) Boolean
b) Integer
c) Float
d) Complex

 O Level Exam Free Test : Click Here  

7 . Which of the following is a valid identifier?

A) 1return

B) return1

C) return

D) $return_1

 

 

8 . Which of the following is a valid string constant?

A) “programming”

B) “programming

C) ‘programming

D) $ programming $

 

 

9 . Which of these about a set is not true?

a) Mutable data type
b) Allows duplicate values
c) Data type with unordered values
d) Immutable data type

 

 Python फ्री टेस्ट हिन्दी में देने के लिए यहाँ click करें

1 0. What will be the output of the following ‘python’ program?

a=1

b=5

if(a==5 or b>10):

    print("I will certainly pass")

else:

    print("I am not so sure about the result")

 

A) I will certainly pass

B) I am not so sure about the result

C) Error

D) None of the above

 

1 1. The result of a Relational operation is always

A) either True or False

B) is less than or is more than

C) is equal or less or more

D) All of the above

 

 

1 2. In order to store values in terms of key and value we use what core data type.

a) list
b) tuple
c) class
d) dictionary

 

 

1 3. Which of the following is false in ‘python’ Programming Language

A) underscore can be used as variable names

B) Variable names can contain digits

C) Variable names can contain blank spaces

D) Capital letters can be used in variable names.

.

 

1 4. Which of the following is not a keyword?

a) eval
b) assert
c) nonlocal
d) pass

1 5. What do we use to define a block of code in Python language?

a. Key
b. Brackets
c. Indentation
d. None of these


 Python फ्री टेस्ट हिन्दी में देने के लिए यहाँ click करें