Report Bug

Qus

What will be the output of the following Python code?

import sys

eval(sys.stdin.readline()) 

Computer

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


A. Error
B. ‘Computer ’
C. Computer8
D. Computer


Solution
A. Error



Explanation
The code shown above will result in an error. This is because this particular function accepts only strings enclosed in single or double inverted quotes, or numbers. Since the string entered above is not enclosed in single or double inverted quotes, an error will be thrown.
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