An Interesting Cipher: More on Strings

  Рет қаралды 60,025

IIT Madras - B.S. Degree Programme

IIT Madras - B.S. Degree Programme

Күн бұрын

Пікірлер: 44
@DHEERAJSINGH-b9e
@DHEERAJSINGH-b9e 2 ай бұрын
i=20 print(i%19)=1 but print(i%21)=20 why?? when i do it on paper it will give 11 if answer is in desimal then how the python give 20 as an output ??
@SiyaRajput-k8c
@SiyaRajput-k8c 5 ай бұрын
I am not understand perfectly because of so many bracket not execute my code
@sayanghosh6996
@sayanghosh6996 3 жыл бұрын
watching this with the knowledge of loops is torture xD
@sayanghosh6996
@sayanghosh6996 3 жыл бұрын
@@jeremy_fragrance_desi 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 3 жыл бұрын
Especially with a Java background lol XD
@roshanekka9687
@roshanekka9687 3 жыл бұрын
Ok Einstein, no need to make a fuss about that here
@sayanghosh6996
@sayanghosh6996 3 жыл бұрын
@@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 3 жыл бұрын
@@sayanghosh6996 Watch at 2x....
@shashank1707
@shashank1707 16 күн бұрын
0:50 Why it is showing error when I execute this code? In vsc.
@SamparkLakshya
@SamparkLakshya 4 күн бұрын
can you plz paste your code here
@shashank1707
@shashank1707 3 күн бұрын
@SamparkLakshya its working now.
@054_nirajkumar3
@054_nirajkumar3 3 жыл бұрын
@ 20:40 what was that error with Capital "I", why it need to change by small i???
@abhishekkumarrai4975
@abhishekkumarrai4975 3 жыл бұрын
because 'I' is not present in alpha. String alpha is a collection of alphabets in small cases only.
@meriid7017
@meriid7017 2 ай бұрын
Dhnaywaad
@ayushlabroo6238
@ayushlabroo6238 2 жыл бұрын
Why % 26 is added ?
@raj_patel
@raj_patel 2 жыл бұрын
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 2 жыл бұрын
@@amanpetwal9760 hmm. NIT + IIT. BigBrain :)
@amanpetwal9760
@amanpetwal9760 2 жыл бұрын
@@raj_patel thanks brother ❣️
@aswathyjanaki109
@aswathyjanaki109 3 жыл бұрын
Good class compared to the other sir
@054_nirajkumar3
@054_nirajkumar3 3 жыл бұрын
थैंक्यू
@altairlight5729
@altairlight5729 Жыл бұрын
nice pedagogy
@siddharthsoni1000
@siddharthsoni1000 9 ай бұрын
better to use ord() , chr() functions
@kmishy
@kmishy 3 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
But loops are not explained yet
@nighteagle5529
@nighteagle5529 Жыл бұрын
​@@cookietree5625why in print function the f exists. Plz reply
@abhinavchaitanya5769
@abhinavchaitanya5769 Жыл бұрын
​@@nighteagle5529Its a format specifier.
@AK-ko3pw
@AK-ko3pw Жыл бұрын
@@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)
@DHEERAJSINGH-b9e
@DHEERAJSINGH-b9e 2 ай бұрын
we really doesn't need to put that much ( ) there they'll not getting any error
@DHEERAJSINGH-b9e
@DHEERAJSINGH-b9e 2 ай бұрын
i=25 i%26 how the remainder would be 25
@rishabgangwar9901
@rishabgangwar9901 3 жыл бұрын
whenever I see joe I just say, "Hey, How you doin'?"
@Karan-sq5el
@Karan-sq5el 3 жыл бұрын
Too much sound echo is there. Bad quality mic
@amanbhanvadia2169
@amanbhanvadia2169 3 жыл бұрын
Is this included in week 1
@avenumadhav3568
@avenumadhav3568 3 жыл бұрын
This is from Week 2, precisely L2.7
@minutecodingtips
@minutecodingtips 2 жыл бұрын
@@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🙏
Introduction to the if statement
9:08
IIT Madras - B.S. Degree Programme
Рет қаралды 40 М.
Introduction to "import library"
15:45
IIT Madras - B.S. Degree Programme
Рет қаралды 43 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Formatted Printing
21:12
IIT Madras - B.S. Degree Programme
Рет қаралды 43 М.
Creating Your Own Programming Language - Computerphile
21:15
Computerphile
Рет қаралды 200 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 947 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 190 М.
String Methods
11:40
IIT Madras - B.S. Degree Programme
Рет қаралды 55 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 902 М.
Birthday Paradox
25:39
IIT Madras - B.S. Degree Programme
Рет қаралды 39 М.
Introduction to while loop
13:06
IIT Madras - B.S. Degree Programme
Рет қаралды 45 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 935 М.
Escape characters and types of quotes
13:00
IIT Madras - B.S. Degree Programme
Рет қаралды 49 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН