Report Bug

Qus_____ function convert an integer to octal string in python. Qusपायथन में ______ फंक्शन एक इंटीजर को ऑक्टल स्ट्रिंग में परिवर्तित करता है।


A. unichr (x)
B. oct (x)
C. chr(x)
D. None of the these


Solution
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)
Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad