Python - MCQ

Multiple Choice Questions


Share with a Friend

 

Python - Multiple Choice Questions (MCQ) - Python Operators and Control Flow Statements - Set 12

21. What is the data type of print(type(0xFF))
A). number
B). hexint
C). hex
D). int
View Answer
Correct: D



22. Select all the valid String creation in Python
A). str1 = “str1”
B). str1 = ‘str1’
C). str1 = ”’str1”’
D). str1 = str(“str1”)
View Answer
Correct: A, B, C, D


23. Select the right way to create a string literal Ault'Kelly
A). str1 = ‘Ault\’Kelly’
B). str1 = ‘Ault\’Kelly’
C). str1 = “””Ault’Kelly”””
D). All of the Above
View Answer
Correct: B



24. What is the result of print(type({}) is set)
A). TRUE
B). FALSE
View Answer
Correct: B


25. What is the output of the following code

x = 50
def fun1():
    x = 25
    print(x)
fun1()
print(x)
A). NameError

B). 25
      25

C). 25
      50

D). 50
      25
View Answer
Correct: C



 
 
 
   
   
   
UltraInfo Technologies
ITDeveloper