Q 1 – What is a correct syntax to output “Hello World” in Python?
echo “Hello World” p “Hello World” print “Hello World” echo “Hello World” Show Answer Answer : (C) print “Hello World”
Explanation : None
Q 2 – What is the maximum possible length of an identifier?
16 32 64 None of these Show Answer Answer : (D) None of these
Explanation : The maximum possible length of an identifier is not defined in the python language. It can be of any number.
Q 3 – Who developed the Python language?
Zim Den Guido van Rossum Niene Stom Wick van Rossum Show Answer Answer : (B) Guido van Rossum
Explanation : Python language was developed by Guido van Rossum in the Netherlands.
Q 4 – In which year was the Python language developed?
1995 1972 1990 1989 Show Answer Answer : (D) 1989
Explanation : None
Q 5 – In which language is Python written?
Java C C++ .Net Show Answer Answer : (B) C
Explanation : Python is written in C programming language, and it is also called CPython
Q 6 – What will be the output of the following code snippet? print(2**3 + (5 + 6)**(1 + 1))
129 8 121 None of these Show Answer Answer : (A) 129
Explanation : The above code will print 129 by following the BEDMAS rule of operator precedence.
Q 7 – What will be the datatype of the var in the below code snippet? var = 10 print(type(var)) var = “Hello” print(type(var))
str and int int and int str and str int and str Show Answer Answer : (D) int and str
Explanation : None
Q 8 – How is a code block indicated in Python?
Brackets. Indentation Key None of these Show Answer Answer : (B) Indentation
Explanation : None
Q 9 – What will be the output of the following code snippet? a = [1, 2, 3] a = tuple(a) a[0] = 2 print(a)
[2, 2, 3] (2, 2, 3) (1, 2, 3) Error. Show Answer Answer : (D) Error.
Explanation : Since we convert a to a tuple and then try to change its content, we will get an error since tuples are immutable.
Q 10 – What will be the output of the following code snippet? print(type(5 / 2)) print(type(5 // 2))
float and int int and float float and float int and int Show Answer Answer : (A) float and int
Explanation : None
Also Read :
हेलो दोस्तों अगर आपको किसी प्रकार की समस्या हो रही है या आपका कोई सवाल अथवा सुझाव है तो हमें कमेंट बॉक्स में जरूर बताएं