Report Bug

Qus

What will be the output of the following Python functions?

x=3

eval('x^2')

Qusनिम्नलिखित Python कार्यों का आउटपुट क्या होगा?


A. Error
B. 1
C. 9
D. 6


Solution
B. 1



Explanation
The function eval is use to evaluate the expression that it takes as an argument. In the above case, the eval() function is used to perform XOR operation between 3 and 2. Hence the output is 1.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad