More Examples of Functions

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 17

  • @sayanghosh6996
    @sayanghosh6996 3 года назад +8

    10:02 'sum' is also an inbuilt function which we overwrote with a variable :P

    • @sudarshaniyengar8549
      @sudarshaniyengar8549 3 года назад +2

      Didn’t get you.

    • @thanos9400
      @thanos9400 2 года назад +2

      @@sudarshaniyengar8549 in the function computing average ,you used sum as a variable....I think it's an inbuilt function

    • @sudarshaniyengar1814
      @sudarshaniyengar1814 2 года назад +6

      My bad 😇. Python is smarter than the programmer. It did break the ambiguity.

    • @thanos9400
      @thanos9400 2 года назад +10

      @@sudarshaniyengar1814 I really never expected you would reply this because it was 7 month old comment....I am really happy you did .It's a gift to have you as our professor...

    • @induvardhan_m
      @induvardhan_m 2 года назад

      @@sudarshaniyengar8549 Sir! why can't we just directly "newl.append(l)" then list 'z' ?

  • @OscarFromIndia
    @OscarFromIndia 8 месяцев назад +2

    def list_appendbefore(l,z):
    newlist = []
    newlist = newlist + z + l
    return newlist
    Isn't this exactly what would do @07:51. Is there a reason why we need to use a for loop?
    Just curious to hear your thoughts

  • @054_nirajkumar3
    @054_nirajkumar3 3 года назад +3

    थैंक्यू

  • @ujjwalverma2870
    @ujjwalverma2870 2 года назад +2

    Sir is telling us remember how to calculate avg after we have complete stats 2 😆

  • @Abhishek022_N
    @Abhishek022_N Год назад +2

    instead of using index, can we directly use( for i in l:) ??

    • @silent7152
      @silent7152 Год назад

      yes surely, you would just need to write newlist.append(i) insted of l[i]

  • @rituparnodhar6265
    @rituparnodhar6265 2 года назад +2

    We can use + instead of append right?

  • @umarulf
    @umarulf 3 дня назад

    grt nd