Report Bug

Qus

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

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

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

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


A. Syntax Error
B. Type Error
C. String Error
D. Run Time Error


Solution
B. Type Error



Explanation

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

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz