Report Bug

Qus

What will be the output of the following Python expression?

x=24//6%3, 24//4//2
print(x)
Qus

निम्नलिखित पायथन एक्सप्रेशन का आउटपुट क्या होगा?

x=24//6%3, 24//4//2
print(x)


A. (1,3)
B. (0,3)
C. (1,0)
D. (3,1)


Solution
A. (1,3)



Explanation
The expressions are evaluated as: 4%3 and 6//2 respectively. This results in the answer (1,3). This is because the associativity of both of the expressions shown above is left to right.
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