What will be the output of the following expression
x=14 print(x>>2)
निम्नलिखित एक्सपरशन का आउटपुट क्या होगा
hear >> bitwise right shift operator which perform the Right shift Operation:
x=14
in binary 14 is 1110
now when we shift 2 bits to the right then value become 0011
now 0011 is convert in decimal which is equivalent to 3, so the answer is 3
What will be the output of following statement ?
>>>"m"+"nl"
निम्नलिखित स्टेटमेंट का आउटपुट क्या होगा?
What is the output of the following?
m=0 while m<5: m+=1 if m==3: break else: print(0)
निम्नलिखित का आउटपुट क्या है?
hear the statement of else block is missing so it gives error
n=5 while n>0: n-=1 if n==2: continue print(n,end=' ')
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 stringinteger_value = 10octal_string = oct(integer_value)print(octal_string)