regarding error

Discussion in 'Big Data and Analytics' started by Ved Prakash_7, Jul 25, 2019.

  1. Ved Prakash_7

    Ved Prakash_7 Member

    Joined:
    Jun 26, 2019
    Messages:
    9
    Likes Received:
    3
    Please review my code where i am doing wrong .
    TypeError: must be real number, not list
    Question is also there in the pic .
    if possible please explain with right code
     

    Attached Files:

    #1
  2. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    55
    Likes Received:
    8
    Hi Ved,

    In your code just try to print the "value" and "type" of -
    [(2*C*e)/H]
    you'll get your answer that what went wrong in your code.

    HINT: Never use a square bracket to represent a mathematical expression in a programming language

    Please try at your end and let me know if you get stuck somewhere, after that I'll post the right answer.

    Regards,
    Sunny,
    Teaching assistant
     
    #2

Share This Page