NIELIT O Level Exam

<p>Which of the following error is returned by the given code ?</p><pre>f = open("test.txt","w")<br>f.write(345)</pre>

Which of the following error is returned by the given code ?

f = open("test.txt","w")
f.write(345)


निम्न में से कौन सी एरर दिए गए कोड द्वारा प्रस्तुत किया जाता है?

f = open("test.txt","w")
f.write(345)

A. Syntax Error सिंटेक्स एरर

B. Type Error टाइप एरर

C. String Error स्ट्रिंग एरर

D. Run Time Error रन टाइम एरर




Correct Answer is :

B. Type Error



Explanation

TypeError: write() argument must be str, not int

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