Report Bug

QusWhich of the following functions does not throw an error? Qusनिम्नलिखित में से कौन सा फंक्शन एरर नहीं देता है?


A. ord()
B. ord(‘ ‘)
C. ord(”)
D. ord(“”)


Solution
B. ord(‘ ‘)



Explanation
The function ord() accepts a character. Hence ord(), ord(”) and ord(“”) throw errors. However the function ord(‘ ‘) does not throw an error because in this case, we are actually passing a blank space as an argument. The output of ord(‘ ‘) is 32 (ASCII value corresponding to blank space).
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