From 375444ff421db6c41fe08574eef9b9111603ce55 Mon Sep 17 00:00:00 2001 From: Vicky-Raghuwanshi <67050782+Vicky-Raghuwanshi@users.noreply.github.com> Date: Wed, 27 Oct 2021 21:02:29 +0530 Subject: [PATCH] Update logical_operators.rst --- source/logical_operators.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/logical_operators.rst b/source/logical_operators.rst index b9cfba7..c6fadd9 100644 --- a/source/logical_operators.rst +++ b/source/logical_operators.rst @@ -85,3 +85,18 @@ Solution turtle.setheading(turtle.towards(0,0)) turtle.forward(1) distance = distance - 1 + +__________ +We can also get the XOR logic ooeration using cap Sysmbol (^). +Example : +If we take XOR operation of 4 and 3 then we can write in python as below: + +num1 = 4 +num2 = 3 + +xor = num1 ^ num2 +print(f"{num1} XOR {num2}" : ,xor) + +__________ +OUTPUT : +4 XOR 3 : 7