34//5=6
34%5=4
hence 6+4=10
based on operator precedency rule first divide and modulus operation take place the after sum is performed
find the output of following code:
import math print(math.fabs(-3.4))
निम्नलिखित कोड का आउटपुट क्या होगा?
pass statement is sued to represent Null Statements
Example:
for a in range(1,11): if a%3==0: pass else: print(a)
What will be the output of following code
import math print(math.pi)
Python doesn't have a built-in do-while loop like some other programming languages.
here ^ is known as bitwise XOR operator which perform the XOR option on bits
in this question 2^5 :
2=> 010 binary of 2
5=> 101 binary of 5
2^5=> 111 which is 7 in decimal
so the answer is 7
(in XOR if bits are same the it gives 0 and if bits are deferent the it give 1)