Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

Which of the following function convert an integer to an unicode character in python?

  • unichr(x)
  • ord(x)
  • hex(x)
  • oct(x)
Solutions
Question - 2

Which one of the following is the correct way of calling a function?

  • function_name()
  • call function_name()
  • ret function_name()
  • function function_name()
Solutions
Question - 3

What will be the output of the following Python code?

 

def fn(var1):
    var1.pop(1)
var1=[1,2,3]
fn(var1)
print(var1

  • [1,2,3]
  • [1,3]
  • [2,3]
  • [1,2]
Solutions
Question - 4

Does python have switch case statement?

  • Python has switch statement but we can not use it.
  • No
  • Yes
  • None of the above
Solutions
Question - 5

'A' + 'B' if '12'.isdigit() else 'X' + 'Y'

  • AB
  • A+B
  • AB12
  • ABXY
Solutions
Question - 6

Which of the following is not used as loop in Python?

  • for loop
  • while loop
  • do-while loop
  • None of the above
Solutions
Question - 7

Which of the following is not valid variable name in Python?

  • _var
  • var_name
  • var11
  • 11var
Solutions
Question - 8

Which one of the following is the correct extension of the Python file?

  • .py
  • .pt
  • .p
  • .python
Solutions
Question - 9

Which of the following is not a keyword in Python language?

  • raise
  • try
  • with
  • val
Solutions
Question - 10

Which one of the following has the highest precedence in the expression?

  • Division
  • Subtraction
  • Power
  • Parentheses
Solutions
Question - 11

Which of the following functions is a built-in function in python language?

  • val()
  • reg()
  • print()
  • None of these
Solutions
Question - 12

Which keyword is use for function?

  • define
  • fun
  • def
  • function
Solutions
Question - 13

Which of the following is correctly evaluated for this function?

pow(x,y,z)  

  • (x**y) % z
  • (x*y) / z
  • (x/y) / z
  • (x*y) % z
Solutions
Question - 14

Study the following function:

import math  
abs(math.sqrt(36))  



What will be the output of this code?

  • 6.0
  • 0.6
  • -6
  • None of these
Solutions
Question - 15

If return statement is not used inside the function, the function will return:

  • void
  • 0
  • Null
  • None
Solutions
Question - 16

Which of the following option is not a core data type in the python language?

  • Dictionary
  • Class
  • Lists
  • None of the above
Solutions
Question - 17

How is a function declared in Python?

  • def function function_name():
  • declare function function_name():
  • def function_name():
  • declare function_name():
Solutions
Question - 18

What will be the output of below Python code?

list1=[8,0,9,5]

print(list1[::-1])

  • [5,9,0,8]
  • [8,0,9]
  • [8,0,9,5]
  • [0,9,5]
Solutions
Question - 19

All classes have a function called?

  • __init__
  • __init__()
  • init
  • init()
Solutions
Question - 20

You can delete properties on objects by using the ______ keyword.

  • delete
  • del
  • drop
  • None of the above
Solutions
Question - 21

What is the maximum possible length of an identifier?

  • 16
  • 32
  • 64
  • None of these
Solutions
Tags:
Python MCQ (Multiple Choice Questions), Advanced Python MCQ, Python MCQ Online test,Python MCQ Questions and answers PDF, Python Interview Questions With Answers, Python Technical Questions with full explanation, Most Expected Python Questions