Median Program in Python | Python for Math

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น •

  • @the_py_peeper01
    @the_py_peeper01 ปีที่แล้ว +2

    Your explanation is so clear and amazing! I wish I had learnt the basics from you!

  • @scottcardwell932
    @scottcardwell932 8 หลายเดือนก่อน

    I was able to use this to understand getting the median and use it in a larger class assignment. Thank you

  • @bharadwajkamepalli3903
    @bharadwajkamepalli3903 2 ปีที่แล้ว +3

    Do more videos on python mate

    • @WrathofMath
      @WrathofMath  2 ปีที่แล้ว +1

      Working on it! Any specific requests?

    • @bharadwajkamepalli3903
      @bharadwajkamepalli3903 2 ปีที่แล้ว +1

      @@WrathofMath like about numpy how it's useful in statistics or other areas of math , also more advanced once that r normally difficult but easy to do with python, some stuff like that.
      Thank you for reply mate

    • @WrathofMath
      @WrathofMath  2 ปีที่แล้ว +1

      Definitely plan on doing numpy lessons, but I'm a little out of practice with it, so will need to spend some time reviewing. I'm very practiced at explaining maths, but always feel a little out of my element when I make these videos.

  • @BadAce1508
    @BadAce1508 8 หลายเดือนก่อน

    What are the advantages of this over using the "statistics.median( )" function?

  • @dharanimurugan5887
    @dharanimurugan5887 10 หลายเดือนก่อน

    Need a video like how to find the middle element is even or odd in python

  • @ukoni8667
    @ukoni8667 ปีที่แล้ว

    Great

  • @bernardinmoutien2359
    @bernardinmoutien2359 2 ปีที่แล้ว

    Can we code it without using if statement? Like using mathematical logic

    • @WrathofMath
      @WrathofMath  2 ปีที่แล้ว +1

      Not exactly sure what you mean by "mathematical logic" in this context, but we could write it without explicitly using the if statement. If we loop the process of removing the top and bottom element from our list (n-1)//2 times, then return the average of what remains, this will produce the correct result for even and odd lists.
      However this only works for sorted lists, so we still need to sort it, which requires if statements even though they may not explicitly appear in our code since the sort method is built in. So we don't need ifs to deal with the even/odd problem, but sorting is a different matter.

  • @BAIW8
    @BAIW8 11 หลายเดือนก่อน

    i did not understand very well why we should sort the list ,??

    • @WrathofMath
      @WrathofMath  11 หลายเดือนก่อน +1

      We should sort the list because the median is defined (roughly) as the middle number of a sorted list. If the list is not sorted, the middle number has no particular significance.