πŸ“Š Problem Solving and Python Programming
Q. What will be the output of the following
Python expression?
4^12
  • (A) 2
  • (B) 4
  • (C) 8
  • (D) 12
πŸ’¬ Discuss
βœ… Correct Answer: (A) 2

Explanation: ^ is the xor operator. the binary form of 4 is 0100 and that of 12 is 1100. therefore, 0100^1100 is 1000, which is equal to 8.


Explanation by: Mr. Dubey
^ is the xor operator. the binary form of 4 is 0100 and that of 12 is 1100. therefore, 0100^1100 is 1000, which is equal to 8.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
921
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate