Birthday Paradox

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

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

  • @adityajha2342
    @adityajha2342 8 месяцев назад +5

    Sir your energy removes my lazyness😁thanks for this awesome lecture

  • @ayushshaw1755
    @ayushshaw1755 Год назад +5

    The clicks of keyboard is relaxing 😌

  • @UdaykumarKUday-yd9ut
    @UdaykumarKUday-yd9ut Год назад +1

    Ur way of telling is nice, more interesting 🎉🎉BINGOOO

  • @akshaykumart.r.3523
    @akshaykumart.r.3523 Год назад +4

    10:50 Listen to Sudarshan Sir's evil laugh😂😂. Play it at different speeds at 0.5, normal or 1.75, hard to determine where it sounds more evil. 😂😂😂

  • @nandinisingh_3504
    @nandinisingh_3504 2 года назад +1

    awesome it was sir , till date I enjoyed this lecture most and not regretting to be the part of this learning .

  • @avenumadhav3568
    @avenumadhav3568 3 года назад +4

    random.random(): 2:22
    random.randint(): 3:44
    birthday paradox: 4:49 5:08 5:30 5:43 8:25 9:12 9:47 10:25 11:00 12:30 13:00 13:43 16:45 18:56
    l.sort: 7:22
    repetition: 7:27 7:46 (proof)
    simulation: 18:56 19:39 20:31 21:00

    • @nikhilatiitm
      @nikhilatiitm 2 года назад +1

      why are you wasting your time bro.

    • @avenumadhav3568
      @avenumadhav3568 2 года назад +1

      @@nikhilatiitm I will try not to :)

  • @tatvakeswani8483
    @tatvakeswani8483 3 года назад +5

    Since we know the length of the list, a for loop is a better option isn't it?

    • @sudarshaniyengar1814
      @sudarshaniyengar1814 3 года назад +9

      Absolutely. 👍

    • @avenumadhav3568
      @avenumadhav3568 3 года назад +1

      Does this work?
      l = []
      for i in range(60):
      l.append(random.randint(1,365))
      l.sort()
      for i in range(len(l)-1):
      if(l[i] == l[i+1]):
      print('repeats', l[i], l[i+1])

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

    sir ,you just have to remove break or else use continue instead , inorder to get get an output of one or more repeatations, right?

  • @manideep2411
    @manideep2411 7 месяцев назад

    Sir should use 1,366 in randrange so as to include 365 i.e. to add Dec 31,right?

  • @TusharMahalya
    @TusharMahalya 2 года назад +1

    To get all the repeating no. in a list, we just need to remove "break" from the if-block..

  • @rashmihiremath191
    @rashmihiremath191 2 года назад +1

    how to know when to use different brackets like (), {}, and []

    • @SimpleSage19
      @SimpleSage19 8 месяцев назад

      just learn or memorise it

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

    Respected Sir,
    I have done the home work. Kindly can you please validate.
    l=[1,1,5,5,6]
    #create empty list
    #for i in range(30):
    #l.append(random.randint(1,365))
    #append random numbers from 1 to 365
    #append 30 of them
    l.sort()
    print(l)
    i=0
    count=0
    while(i

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

    I like your style

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

    Remove 'break' and get the all repeating elements printing in kernal

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

    use of flag??

  • @manishpatankar7020
    @manishpatankar7020 3 года назад +4

    Surprised to see why code did not error out for len(l-1), It has to be len(l-2)....any reason why code worked on your machine professor?

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

      because there is no equality at len(i-1), rewatch at 15:50

    • @manishpatankar7020
      @manishpatankar7020 3 года назад +1

      @@ZampGaming Thanks.... missed it... actually '

    • @ZampGaming
      @ZampGaming 3 года назад

      @@manishpatankar7020 then subscribe me 😂

    • @sudarshaniyengar1814
      @sudarshaniyengar1814 3 года назад +4

      Minor slippages. Please adjust 😄

    • @manishpatankar7020
      @manishpatankar7020 3 года назад +1

      @@sudarshaniyengar1814 Thank you sir...

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

    18:31 just simply remove break to get all repetition

  • @kumarprateek238
    @kumarprateek238 3 года назад

    Which video were we taught about import math?

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

      exactly my doubt too

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

      23rd video of the list - "import library"

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

    do we really need to use flag here?

  • @HIMANSHURASTOGI-f8o
    @HIMANSHURASTOGI-f8o 8 месяцев назад

    105 105 to hai hi, hindi bhi hai hi.

  • @ashishsaini1443
    @ashishsaini1443 6 месяцев назад

    from random import randint
    date_collection=[]
    for i in range(30):
    date_collection.append(randint(1,365))
    print(f"The various 30 random date between are
    {date_collection}")
    data_collection=date_collection.sort(reverse=True)
    print(f"The decending order random date between are
    {date_collection}")
    no_repeat_condition=True
    for i in range(0,len(date_collection)-1):
    if(date_collection[i]==date_collection[i+1]):
    no_repeat_condition=False
    print(f"we found repeating values {date_collection[i]} and {date_collection[i+1]}")
    if(no_repeat_condition):
    print(f"we didnt find any repeating values")

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

    For people using PyCharm as their IDE, add a " ; " at the end of the break statement.

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

    थैंक्यू

  • @kajolsingh7259
    @kajolsingh7259 3 года назад

    Great

  • @alexioscarlos7727
    @alexioscarlos7727 8 месяцев назад

    At 23:20 sir spoke in hindi mistakenly😂😂😂

  • @LAVANYATADAVARTI
    @LAVANYATADAVARTI Год назад +1

    Sir used a little bit of Hindi here😅