NIELIT O Level Exam

_____ function convert an integer to octal string in python.

_____ function convert an integer to octal string in python.

पायथन में ______ फंक्शन एक इंटीजर को ऑक्टल स्ट्रिंग में परिवर्तित करता है।

A. unichr (x)

B. oct (x)

C. chr(x)

D. None of the these इनमें से कोई नहीं




Correct Answer is :

B. oct (x)



Explanation

In Python, you can use the oct() built-in function to convert an integer to its octal representation as a string. Here's an example:


# Convert an integer to octal string
integer_value = 10
octal_string = oct(integer_value)
print(octal_string)
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