An Interesting Cipher: More on Strings

Поделиться
HTML-код
  • Опубликовано: 3 май 2021
  • An Interesting Cipher: More on Strings
    "Week: 2
    Topic: An Interesting Cipher: More on Strings" IIT Madras welcomes you to the world’s first BSc Degree program in Programming and Data Science. This program was designed for students and working professionals from various educational backgrounds and different age groups to give them an opportunity to study from IIT Madras without having to write the JEE. Through our online programs, we help our learners to get access to a world-class curriculum in Data Science and Programming.
    To know more about our Programs, please visit :
    BSc Degree in Programming and Data Science - onlinedegree.iitm.ac.in/
    Diploma in Programming / Data Science - diploma.iitm.ac.in/

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

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

    watching this with the knowledge of loops is torture xD

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

      @@rahulfederer20 because this is painful to look at when you already know all of this can be done in 2-3 lines using loops. not only is it small but also more soft-coded (as opposed to hard-coded) and considered a good programming practice. People who dont know programming already are not expected to know all this in week 1 or 2, so dont worry about it too much. once you learn it in future weeks, it would be clear.

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

      Especially with a Java background lol XD

    • @roshanekka9687
      @roshanekka9687 2 года назад +4

      Ok Einstein, no need to make a fuss about that here

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

      @@roshanekka9687 lol, there's nothing special about it, wait for 1 or 2 more weeks you'll learn that yourself. And stop taking everything as an attack lol chill.

    • @AMITKUMAR-mq6wh
      @AMITKUMAR-mq6wh 2 года назад

      @@sayanghosh6996 Watch at 2x....

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

    थैंक्यू

  • @aswathyjanaki109
    @aswathyjanaki109 2 года назад +7

    Good class compared to the other sir

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

    nice pedagogy

  • @siddharthsoni1000
    @siddharthsoni1000 3 месяца назад

    better to use ord() , chr() functions

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

    @ 20:40 what was that error with Capital "I", why it need to change by small i???

    • @abhishekkumarrai4975
      @abhishekkumarrai4975 3 года назад +12

      because 'I' is not present in alpha. String alpha is a collection of alphabets in small cases only.

  • @rishabgangwar9901
    @rishabgangwar9901 3 года назад +3

    whenever I see joe I just say, "Hey, How you doin'?"

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

    9:50 This can be also done like this
    alpha='abcdefghijklmnopqrstuvwxyz'
    name="manish"
    nname=''
    for i in name:
    ind=alpha.index(i) +1
    nname+=alpha[ind]
    print(nname)

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

      alpha = 'abcdefghijklmnopqrstuvwxyz'
      name = input("Enter your name:")
      new_name = ''
      for i in name:
      k = (alpha.index(i)+1)%26
      new_name += alpha[k]
      print(f"
      {new_name}")
      your code was breaking at "z" so i fixed it with some more additions like an input from user :)

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

      But loops are not explained yet

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

      ​@@cookietree5625why in print function the f exists. Plz reply

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

      ​@@nighteagle5529Its a format specifier.

    • @AK-ko3pw
      @AK-ko3pw 6 месяцев назад

      @@cookietree5625 alpha = "abcdefghijklmnopqrstuvwxyz"
      name=input("Enter your name - ")
      updated_name= ""
      for i in range(len(name)):
      k = alpha[((alpha.index(name[i]))+1)%26]
      updated_name+=k
      print(updated_name)

  • @ayushlabroo6238
    @ayushlabroo6238 2 года назад +4

    Why % 26 is added ?

    • @raj_patel
      @raj_patel Год назад +3

      As per my understanding what if the name is "zoo".? we want ith+1 letter. So we want a z+1 letter. it's a. so 26%26 = 0 and we will get 'a'. (Maybe I am wrong, please correct me if I am)

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

      you are absolutely right 👍

    • @raj_patel
      @raj_patel Год назад +3

      @@amanpetwal9760 hmm. NIT + IIT. BigBrain :)

    • @amanpetwal9760
      @amanpetwal9760 Год назад +3

      @@raj_patel thanks brother ❣️

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

    Is this included in week 1

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

      This is from Week 2, precisely L2.7

    • @minutecodingtips
      @minutecodingtips Год назад +4

      @@avenumadhav3568 sir are you a student of diploma or Degree or Foundation. I see you time stamped a lot of lectures from the different subject.
      Thanks for helping us out🙏

  • @Karan-sq5el
    @Karan-sq5el 2 года назад +1

    Too much sound echo is there. Bad quality mic