Question - 1
Who developed Python Programming Language?
- Niene Stom
- Wick van Rossum
- Rasmus Lerdorf
- Guido van Rossum
Solutions
Answer- D
Question - 2
Is Python case sensitive when dealing with identifiers?
- no
- yes
- machine dependent
- None of these
Solutions
Answer- A
Question - 3
Which of the following is used to define a block of code in Python language?
- Indentation
- Key
- Brackets
- All of the above
Solutions
Answer- A
Question - 4
Which of the following functions can help us to find the version of python that we are currently working on?
- sys.version(1)
- sys.version(0)
- sys.version()
- sys.version
Solutions
Answer- A
Question - 5
Python supports the creation of anonymous functions at runtime, using a construct called __________.
- pi
- anonymous
- lambda
- None of these
Solutions
Answer- C
Question - 6
What are the values of the following Python expressions?
2**(3**2)
(2**3)**2
2**3**2
- 512, 64, 512
- 512, 512, 512
- 64, 512, 64
- 64, 64, 64
Solutions
Answer- A
Question - 7
Which of the following functions is a built-in function in python?
- factorial()
- seed()
- sqrt()
- print()
Solutions
Answer- D
Question - 8
Which of the following is the use of the id() function in python?
- Every object doesn’t have a unique id
- Id returns the identity of the object
- All of the mentioned
- None of the mentioned
Solutions
Answer- B
Question - 9
In which year was the Python 3.0 version developed?
Answer- A
Question - 10
What is the method inside the class in python language?
- Object
- Function
- Attribute
- Argument
Solutions
Answer- B
Question - 11
Why does the name of local variables start with an underscore discouraged?
- It indicates a private variable of a class
- It confuses the interpreter
- To identify the variable
- None of these
Solutions
Answer- A
Question - 12
Which of the following declarations is incorrect in python language?
- xyzp = 5,000,000
- x y z p = 5000 6000 7000 8000
- x,y,z,p = 5000, 6000, 7000, 8000
- x_y_z_p = 5,000,000
Solutions
Answer- B
Question - 13
import math
abs(math.sqrt(36))
What will be the output of this code?
Answer- D
Question - 14
Answer- B
Question - 15
What is the out of the code?
def rev_func(x,length):print(x[length-1],end='''')
rev_func(x,length-1)
x=[11,12,13,14,15]
rev_func(x,5)
- The program runs fine without error.
- Program displays 15 `4 13 12 11.
- Program displays 11 12 13 14 15.
- Program displays 15 14 13 12 11 and then raises an index out of range exception.
Solutions
Answer- D
Question - 16
How to create a frame in Python?
- Frame=new.window()
- Frame=frame.new()
- Frame=Frame()
- None of these
Solutions
Answer- C
Question - 17
Suppose you are using a grid manager then which option is best suitable to place a component in multiple rows and columns?
- Columnspan and rowspan
- Only row
- Only column
- Only rowspan
Solutions
Answer- A
Question - 18
How you can lift the pen of in turtle?
- Turtle.lift()
- Turtle.liftup()
- Turtle.penup()
- Turtle.up()
Solutions
Answer- C
Question - 19
Which of the following option is not a core data type in the python language?
- Dictionary
- Lists
- Class
- All of the above
Solutions
Answer- C
Question - 20
Study the following statement
z= {"x":0,"y":1}
Which of the following is the correct statement?
- x dictionary z is created
- x and y are the keys of dictionary z
- 0 and 1 are the values of dictionary z
- All of the above
Solutions
Answer- D
Practice more set questions