Advertisements
Advertisements
प्रश्न
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = 24 // 4 // 2
print(num1)
टिप्पणी लिखिए
Advertisements
उत्तर
num1 = 24 // 4 // 2
#When the operators are the same, left to right order will be followed for operation
num1 = 6 // 2
#When floor division is used, the return value will be int the data type
num1 = 3
Therefore, the output will be 3.
shaalaa.com
Operators in Python
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
