Assignment Operators in Python

Поділитися
Вставка
  • Опубліковано 25 сер 2024
  • 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.nesoacadem...
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacadem...
    Website ► www.nesoacadem...
    Forum ► forum.nesoacad...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #PythonByNeso #PythonProgramming #OperatorsInPython

КОМЕНТАРІ • 46

  • @DrSpooglemon
    @DrSpooglemon Рік тому +3

    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").

  • @vivekacharyavivekacharya6456
    @vivekacharyavivekacharya6456 Рік тому +4

    In decimal its 2 and in binary it is '0b10'

  • @user-py1ve3of8h
    @user-py1ve3of8h 14 днів тому

    thank so much this made a lot of sense

  • @ECEKOTESWARARAOM
    @ECEKOTESWARARAOM 11 місяців тому +3

    X=55(110111)
    Y=10(1010)
    By apply xor operator it X^=Y(111101)
    print (x) =61

    • @veeratzxmatey6146
      @veeratzxmatey6146 2 місяці тому

      X is 2 not 61

    • @Fawz_1470
      @Fawz_1470 10 днів тому

      yes u did OR ie (x |= y) for which u get 61. but u shld do AND ie (x &= y) for which u get 2

  • @MayurMitra-i9i
    @MayurMitra-i9i Місяць тому +1

    Answer = 2. Thanks for the video.

  • @vivekacharyavivekacharya6456
    @vivekacharyavivekacharya6456 Рік тому +4

    Sir i will request you to please upload the classes as soon as possible

  • @jingersatuh6322
    @jingersatuh6322 8 місяців тому +3

    Homework : 55 & 10
    = 0b0110111 & 0b00001010
    = 0b0000010
    = 2 (Decimal)

    • @crazystatus8249
      @crazystatus8249 4 місяці тому

      How bro can you teach me

    • @suhailsnmsnm5397
      @suhailsnmsnm5397 3 місяці тому

      @@crazystatus8249 he did little mistake while typing but answer is correct its 2

    • @Fawz_1470
      @Fawz_1470 10 днів тому

      @@crazystatus8249
      binary of 55 =110111
      binary of 10 = 1010
      On doing Bitwise AND operation,
      ie only when 1 and 1 appears, we take 1
      but in case of 0 and 0, 1 and 0,we take 0
      So we get 000010
      On doing binary to decimal conversion,
      0x2⁵ + 0x2⁴ + 0x2³ + 0x2² + 1x2¹ + 0x2⁰
      which equals to 2 which is the answer.
      So >>> x=55
      >>> y=10
      >>> x &= y
      >>>x
      2
      >>>bin(x)
      0b10

  • @venkatraman_padmanaban
    @venkatraman_padmanaban 9 місяців тому +2

    Output value of x is 2

  • @mradulsonare2458
    @mradulsonare2458 6 місяців тому +4

    Answer is 2

  • @moviesync3131
    @moviesync3131 8 місяців тому +1

    2:20 I don't know what sign is that. Is that supposed to be the [and] shortcut sign...?

  • @khushantwankhede8311
    @khushantwankhede8311 7 місяців тому

    answer : x = 2
    & thankyou for making video for us

  • @monicabhattacharya9029
    @monicabhattacharya9029 Рік тому +1

    please upload videos daily

  • @sarswatigoutam
    @sarswatigoutam 5 місяців тому

    Tqqq so much sirr

  • @techdigital280
    @techdigital280 6 місяців тому

    Thnx a lot

  • @stevenmakatu7698
    @stevenmakatu7698 4 місяці тому

    >>> x = 55
    >>> y = 10
    >>> x &= y
    >>> x

  • @danielquarshie5235
    @danielquarshie5235 8 місяців тому

    The decimal value is 2

  • @pmalik1975
    @pmalik1975 10 місяців тому +1

    Decimal value is 2

    • @suryaprakashtumu8671
      @suryaprakashtumu8671 9 місяців тому

      How will come 2

    • @tafaranyamhunga
      @tafaranyamhunga 8 місяців тому

      55 = 110111 and 10 = 1010, so 55 & 10 is 000010 or(10), and 10(2) in decimal is 2@@suryaprakashtumu8671

  • @jagsank1k2
    @jagsank1k2 Місяць тому

    answer is 2

  • @joydeboraon6637
    @joydeboraon6637 Місяць тому +1

    2

  • @SG_BTech
    @SG_BTech 4 дні тому

    Not possible in4-5 minutes

  • @maneeshabandaru
    @maneeshabandaru 5 місяців тому

    output=2

  • @danieleberenwafor6876
    @danieleberenwafor6876 7 місяців тому

    Interested

  • @tharunkumar8430
    @tharunkumar8430 8 місяців тому

    Answer(2)

  • @shikharbhardwaj1352
    @shikharbhardwaj1352 6 місяців тому

    answer = 2

  • @harishmahajan6845
    @harishmahajan6845 Рік тому +1

    homework answer is 2

    • @kumarp5954
      @kumarp5954 11 місяців тому

      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
      @kumarp5954 11 місяців тому

      In my notebook,
      After performing x&y answer is 110010 which is 50
      And computer answers is 2 why

    • @tafaranyamhunga
      @tafaranyamhunga 8 місяців тому

      55 = 110111 and 10 = 1010, so 55 & 10 = 000010 or(10), and 10(2) in decimal is 2@@kumarp5954

  • @imsujata546
    @imsujata546 Рік тому

  • @rehanasultana4760
    @rehanasultana4760 10 місяців тому

    65

  • @Monkey-nv3pj
    @Monkey-nv3pj Рік тому

    1st like 1st view

  • @induediga5542
    @induediga5542 10 днів тому

    Answer is 2

  • @toprashant35
    @toprashant35 Рік тому +2

    2

  • @HimanshuVerma-ig5tw
    @HimanshuVerma-ig5tw 10 місяців тому

    2

  • @clashroyaldaxter9072
    @clashroyaldaxter9072 Рік тому

    2

  • @rohithreddy4603
    @rohithreddy4603 Рік тому

    2

  • @rathinsinha5646
    @rathinsinha5646 6 місяців тому

    2