MCQ Answer

_____ function convert an integer to octal string in python.

_____ function convert an integer to octal string in python.

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

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 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