Assignment Operators in Python
Python Programming: Assignment Operators in Python
Topics discussed:
1. Introduction to Assignment Operators.
2. Assignment Operators in Python.
Python Programming Playlist: • Python Programming
Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
Contribute: www.nesoacademy.org/donate
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy.org/recommend...
Website ► www.nesoacademy.org/
Forum ► forum.nesoacademy.org/
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#PythonByNeso #PythonProgramming #OperatorsInPython
Пікірлер: 39
It should be noted that the operators tell the python interpreter to call a corresponding magic method on the object to the left of the operator passing the object to the right as an argument. The + operator utilises the __add__ method and the += operator utilises the __iadd__ method. 'a + b' is equivalent to 'a.__add__(b)' and 'a += b' is equivalent to 'a.__iadd__(b)'. You can create bespoke behaviours in your classes using these double underscore methods(or "dunder methods").
In decimal its 2 and in binary it is '0b10'
X=55(110111) Y=10(1010) By apply xor operator it X^=Y(111101) print (x) =61
@veeratzxmatey6146
20 күн бұрын
X is 2 not 61
Answer = 2. Thanks for the video.
answer : x = 2 & thankyou for making video for us
2:20 I don't know what sign is that. Is that supposed to be the [and] shortcut sign...?
Homework : 55 & 10 = 0b0110111 & 0b00001010 = 0b0000010 = 2 (Decimal)
@crazystatus8249
3 ай бұрын
How bro can you teach me
@suhailsnmsnm5397
2 ай бұрын
@@crazystatus8249 he did little mistake while typing but answer is correct its 2
Output value of x is 2
please upload videos daily
Sir i will request you to please upload the classes as soon as possible
@249srihari4
Жыл бұрын
Me to sir
Thnx a lot
Tqqq so much sirr
Answer is 2
Interested
The decimal value is 2
>>> x = 55 >>> y = 10 >>> x &= y >>> x
Decimal value is 2
@suryaprakashtumu8671
8 ай бұрын
How will come 2
@tafaranyamhunga
7 ай бұрын
55 = 110111 and 10 = 1010, so 55 & 10 is 000010 or(10), and 10(2) in decimal is 2@@suryaprakashtumu8671
output=2
2
Answer(2)
answer = 2
❤
homework answer is 2
@kumarp5954
9 ай бұрын
But how, binary value of 55=110111 and 10=1010 so how we perform & operator in this one is 6 digit and second is 4 digit????!!
@kumarp5954
9 ай бұрын
In my notebook, After performing x&y answer is 110010 which is 50 And computer answers is 2 why
@tafaranyamhunga
7 ай бұрын
55 = 110111 and 10 = 1010, so 55 & 10 = 000010 or(10), and 10(2) in decimal is 2@@kumarp5954
65
1st like 1st view
2
2
2
2