The way you approach the problem shows your intelligent and maturity in this field.This is how one should teach concepts to the students.
@kamrulislam9767
4 жыл бұрын
I will say it is the best data structure and algorithm course in python. Explanation, lecture speed, and demonstration are the best. Thank you very much.
@HariKrishnan-qp1tm
Жыл бұрын
Hi , I have a doubt in selecting course for nptel.. to learn python should I start with this course ( Programming, Data structure and Algorithms using Python) or should I enroll Programming in Python?
@DashingData66666
6 ай бұрын
come on r u serious
@engineerspodcast1986
2 жыл бұрын
Sir just superb way of explaining... Enjoyed listening and understand your lectures... Just fantastic 🔥
@dhanunjaydola
4 жыл бұрын
def GCD_1(m,n): def factor(x): return [i for i in range(1,x+1) if x%i==0] x=factor(m) y=factor(n) return max(set(x).intersection(set(y)))
@GoogleMathtube
5 жыл бұрын
from array import* def gcd(x,y): vals = array('i',[]) for i in range(1,x+1): if(x%i==0): print(i) vals.append(i) print(vals) p = array('i',[]) for j in range(1,y+1): if(y%j==0): print(j) p.append(j) print(p) val = array('i',[]) for i in range(len(vals)): if(y % vals[i] ==0): print(vals[i]) val.append(vals[i]) print(val) t = max(val) return t m= int(input('enter the first number')) n= int(input('enter the second number')) gcd1 = gcd(m,n) print(gcd1)
@akashgahlot6796
4 жыл бұрын
Sir i just want to add one thing ,we can also use *return (max(cf))* instead of using indexing .
@primedecay13
4 жыл бұрын
#time complexity is important, this code is way more optimized than what's shown. def gcd(num1, num2): for i in range (min(num1, num2) - 1, 1, -1): if (num1 % i == 0) and (num2 % i == 0): return i return 1
@yuvrajsinghchauhan4442
6 жыл бұрын
1- Find the smaller no. and its factors first 2- Find the factors of the larger no. only through the factors of smaller no. will it work?
@pswalia2u
5 жыл бұрын
yeah it is much more optimised.
@wemake4u444
4 жыл бұрын
we got the same thought
@seemaverma279
3 жыл бұрын
yeah...........good job.
@nvcse136
10 ай бұрын
If one the numbers is a large number when we find factors for that number it takes O(n) time complexity which is a worst case . So it is better for small numbers . we can also approach through Euclid division algorithm
@abhijeet56
6 жыл бұрын
Excellent explanation sir.. The only problem was low sound
@prasadkancharla6226
5 жыл бұрын
use a volume booster for chrome
@ShashwatPandeyindia
6 жыл бұрын
# Another way of doing it: a = int(input('Enter the first number:')) b = int(input('Enter the second number:')) if a >= b : x = b else: x = a while(x >= 1): if(a%x==0 and b%x ==0): print('HCF is', x) break else: x = x-1
@kunaldineshpatil
4 жыл бұрын
Spoiler Alert: Same code has been used at the end of second lecture of Week-1 Just watch the next video
@ravisiswaliya7422
6 жыл бұрын
#sortest method to solve this problem def gcd(a,b): s1 = [i for i in range(1,a+1) if a%i==0] #finding numbers that divide by a s2 = [i for i in range(1,b+1) if b%i==0] #finding numbers that divide by b print(max(list(set(s1).intersection(s2)))) #finding largest number that divide by both a & b gcd(28,70) #calling function
@ruturajjadhav8905
4 жыл бұрын
Thank you
@primedecay13
4 жыл бұрын
definitely not the shortest, it has 2 list comprehension, while you could just use a single loop...
@prabakart3531
2 жыл бұрын
x=14 y=63 z=min(x,y) print(z) for i in range(1,z+1): if x%i ==0 and y%i ==0: gcd=i print("GCD is : ",gcd); Output: 14 GCD is : 7
@SA-qi7sg
3 жыл бұрын
I have one doubt is algorithm means we can write code with minimum number of code or minimum computation time ?
@ramachandrudu198
2 жыл бұрын
Thank you very much for the way you explain sir😍
@alkapandey3038
Жыл бұрын
This is complete series yea uncompleted pls tell me
@sandhiyap3614
Ай бұрын
Hii...tell me how to read for this course To pass in the exam?!!
@sachinrajbhardseudwarka8246
Жыл бұрын
Great!!
@You-t1g
Жыл бұрын
Voice is too bad, I can't hear.
@anandikts3432
5 жыл бұрын
one more doubt sir, why should not we stop getting factors for 63, the bigger among the two numbers, when it crosses 14., the smaller among them.
@wemake4u444
4 жыл бұрын
Another Way (optimized code): m=int(input("enter m")) n=int(input("enter n")) k=m while m>=2: if n%m==0 and k%m==0: print('gcd is',m) break else: m-=1 else: print("gcd is 1")
@shahidzain9714
5 жыл бұрын
#simple way is m=int(input("enter the number m : ")) n=int(input("enter the number n : ")) def gcd(m,n): count=0 if m
@kunaldineshpatil
4 жыл бұрын
In the next video the second programme discussed uses the same Algorithm with less lines of code
@debaleenaghosh851
4 жыл бұрын
Thank you for the explanation. But then again wouldn't it be much easier if we just find out which number is smaller, find the factors for the smaller number, Then check if the factors also divide the larger one. The largest factor would give us the GCD.
@soumojitbasu9244
2 жыл бұрын
As we now the purpose of computing is to find systematic solution and it may or may not be clever/intelligent (Here intelligent or clever is tied to efficiency)so what he is trying is to find a solution (brute force method)and what you're saying is an efficient solution.
@souravkumarshaw7090
5 жыл бұрын
Sir which book is best to study data structure and algorithm in Python ?
@pavankumar1004
5 жыл бұрын
core python by r.nageshwar rao
@seemaverma279
3 жыл бұрын
@@pavankumar1004 thanks
@anandikts3432
5 жыл бұрын
Thanks for the Lecture Sir. Sir, one small doubt ,for getting the factors of a number, isn't it fair enough to stop after it crosses half of the value of that number, like can't we stop getting factors for 14 after it crosses 14/2 i.e., 7 sir?
@shubh13272anand
4 жыл бұрын
Exactly. I was also thinking same
@usharanidash2831
4 жыл бұрын
No, because here 14 is also a factor
@mamathamaddur4593
4 жыл бұрын
Yes...
@hallo-xp2wh
2 жыл бұрын
@@usharanidash2831 1 and n are, trivially, factors or divisors of n ! you can append 1 in advance and later append n to the list.
@jindagi_ka_safar
5 жыл бұрын
Did this best course in Python........scored 66% in 2017
@uzeirselot
2 ай бұрын
I'm finding it difficult.
@vidit9024
4 жыл бұрын
Great video
@AgamdeepSingh1603
4 жыл бұрын
Are these all the lectures which r included in nptel course??
@shubhamvhanmane1292
3 жыл бұрын
yes
@DebmallarDasgupta
2 ай бұрын
Sir you are just amazing.
@amandebnath2593
3 жыл бұрын
God bless you @Prithwijit Das
@hemanthsamudrala1748
4 жыл бұрын
Is this class is from bascis about python
@gitsof3727
6 жыл бұрын
print ("Enter the first no to find gcd of that no") a= input() print("enter the second number") b = input() print("the enter no is", a, b) a = int(a) b = int(b) if(a>b): for index in range(b,0,-1): if(a%index == 0 and b%index==0 ): print("the index is ", index) break else: for index in range(a, 0 , -1): if(a%index == 0 and b%index ==0): print ("the index is ", index) break
@SHRESHTHAGUPTAnullRA
4 жыл бұрын
def gcd(a,b): x=min(a,b) for y in range(1,x+1): if (a%y==0) and (b%y)==0: hcf=y return hcf
@siddheshdhanawade3709
2 жыл бұрын
how can i get these slides ?
@chakradharreddy6381
4 жыл бұрын
How can we justify that... f in the program is referred to as one of the factors in the list fm.?
@SlickShitt
3 жыл бұрын
it's just like assigning a variable to every item in the list.
@Jaimin_Bariya
26 күн бұрын
Jp here [comment number 125] Thank you sir :)
@debjyotisaha4129
4 жыл бұрын
Can I get the pdf document of all the lectures here?
@synchrobeast343
4 жыл бұрын
Is this course good to understand and implement Linked Lists, Trees and OOPS?
@shri0809
Жыл бұрын
What is 'f'?
@sujathalaveti
8 ай бұрын
F for function
@SA-qi7sg
3 жыл бұрын
def gcd(a, b): final_number = [i for in range(1, min(a, b)+1) if a % i == 0 and b % i == 0][-1] return final_numbrer
@BilalAhmed-ib3yw
4 жыл бұрын
@12:08 Or we could use the factors of the smaller digit, 14 in this case and check its factor to divide the larger digit 63, and compare if it has multiple common factors and reports the highest be them.
@kunaldineshpatil
4 жыл бұрын
def gcd(m,n): x=min(m,n) fx=[] for i in range(1,x+1): if (x%i)==0: fx.append(i) cf=[] for f in fx: if(n%f)==0: cf.append(f) return (max(cf))
@firefly6630
3 жыл бұрын
Ye kaun sa vergion hai python ka
@muskaankushwaha6
2 жыл бұрын
😍😍love this lecture
@subramaniank8086
3 жыл бұрын
sir you are amazing
@flyingangel8761
6 жыл бұрын
Sir. Plz use some higher sound levels..Facing Problems with the low voice
@anandikts3432
5 жыл бұрын
provided 1 and that particular number will be always added as factors every time
@akshay321jain
4 жыл бұрын
where can we access assignments and quizes
@prateekgupta8875
4 жыл бұрын
you have to enroll on the official website i.e. NPTEL for this course
@GSaiRajesh
6 жыл бұрын
The code is not working in Python, please help.
@kasmitharam982
6 жыл бұрын
can you post the error which is shown ,so that it will be easy to help you sort the problem.
@gitsof3727
6 жыл бұрын
print ("Enter the first no to find gcd of that no") a= input() print("enter the second number") b = input() print("the enter no is", a, b) a = int(a) b = int(b) if(a>b): for index in range(b,0,-1): if(a%index == 0 and b%index==0 ): print("the index is ", index) break else: for index in range(a, 0 , -1): if(a%index == 0 and b%index ==0): print ("the index is ", index) break
@anithaselvam1823
6 жыл бұрын
low sound sir
@ritiksaxenaofficial
4 жыл бұрын
Well explained.
@nirbhay_raghav
4 жыл бұрын
Bullet points look like novel corona virus
@VikasKM
5 жыл бұрын
Even with full volume I can hardly hear the lecture..
@Shivani-ex1iv
4 жыл бұрын
You should try using earphones
@anirbandey5608
4 жыл бұрын
Change ur earphone and stop complaining
@VikasKM
4 жыл бұрын
Anirban De how about u take ur suggestion n shove it up. Read other comments to know about the volume problem with this video. Before ranting here.
@LocalMarket-book-delivery-app
7 жыл бұрын
low sound
@r.k.navinganeshapaandiyan3702
6 жыл бұрын
Increase your video's sound clarity
@pareshkumarsahoo3421
4 жыл бұрын
Crystal clear
@chaitanyakumar8431
4 жыл бұрын
Could you please share me the reference book or any materials
@dolcyrao5763
4 жыл бұрын
can you please tell the pre-requisite for this course??
@vatsalsharma5791
4 жыл бұрын
You should know python programming language
@reasonbehindtech1236
4 жыл бұрын
You should know maths till class 12th only
@rockets1582
6 жыл бұрын
IndexError: list index out of range (what does it mean )
@maker72460
6 жыл бұрын
you must be doing something wrong. The code in the lecture is all correct. Index Error suggests that you are trying to access an address(or index) in the list which has no element in it.
@adityatripathy2107
6 жыл бұрын
you are trying to visit an index(position) in list which has nothing stored in it and isn't defined
@nikhilsrivastava2309
5 жыл бұрын
please if someone can provide pdf associated with the above nptel course
@SANTOSHSHARMA-ni1hi
2 жыл бұрын
This course for exllent best books
@sanjayguptacg486
5 жыл бұрын
low sound. very difficult to listen.
@gitsof3727
6 жыл бұрын
please sure in indentation otherwise get an error
@dharshinidharshu3079
8 ай бұрын
Sounds is not audible
@saikumarnaik1298
7 жыл бұрын
please send the link of next lecture
@diazsoul38
5 жыл бұрын
KZitem algorithm brought me here. Is that a signal?
@kushagrak960
5 жыл бұрын
Hahaha
@varuncomesback
7 жыл бұрын
Thanks for the lecture
@soumyadeeptaghosh7469
3 жыл бұрын
this is NOT NPTEL Lecture. please name it different
@ramsubhash5465
Жыл бұрын
Evadiki vinapadatundi ra
@lakshaypiplani3522
6 жыл бұрын
IndexError: list index out of range
@himanshu2471
5 жыл бұрын
in the last piece of code for cf, use (fm) and (fn) instead of [fm] and [fn]
@PayelDasDewan
5 жыл бұрын
Sound is so low that also with headphone it makes problem 🙄🙄🙄
@girijadevi3010
5 жыл бұрын
No
@avinashdwivedi2015
5 жыл бұрын
then buy a better earphones/headphones
@PayelDasDewan
5 жыл бұрын
Using Sony's headphone... this total faculty of nptel is taking 1k per exam and are fail to do a good Audio that's a real bogus!
@avinashdwivedi2015
5 жыл бұрын
@@PayelDasDewani dont know about that.. i can hear good from my earphones..so i got no complaints.. and also 1k is too cheap to get a certification
@PayelDasDewan
5 жыл бұрын
@G Sai Sundar Thousands of people are studying here! When a professional is acting like a amature what will i do being a grown up come on man!! Cangrats yourself for being a grown up 😂😂😂😂
@ravimeena5866
6 жыл бұрын
low sound not listin
@Hackersgroundhck
4 жыл бұрын
Audio is bull shit don't u people check video after uploading
@uchihaitachi5404
2 ай бұрын
muj vale bkl abh yeh bakchodi ka bhi certificate dilare
@harshgarg7025
4 жыл бұрын
I guess you are doing wrong not programming part but the gcd part because gcd defination is product of all the common factors not greatest common factor
@kunaldineshpatil
4 жыл бұрын
The product of all Common "PRIME" Factors of any two numbers gives us the greatest common Factor aka HCF/GCD
@asmitsaraf9002
5 жыл бұрын
This course is not at all helpful and the content is also out dated. Also, there are hidden criteria which can cause non-eligibility for the E-certificate. So, even if you get the passing marks you won't get your certificate. (Don't take this course if you are trying to get credits for MOOCs as an elective for college degree)
@shaunsven3174
5 жыл бұрын
Can you explain why it’s not helpful and what’s the hidden criteria. I am thinking of taking this course and your reply would be helpful.
@asmitsaraf9002
5 жыл бұрын
@G Sai Sundar Talking about the platform
@asmitsaraf9002
5 жыл бұрын
@@shaunsven3174 Hidden criteria was to pass in a programming assignment that was conducted at the very last of your Assignment and it consists of 25%, for which only selective questions were evaluated (specific questions) like A1, A3...etc and if you don't complete all of them you won't even pass.
Пікірлер: 125