Program To Calculate LCM Of Two Numbers | Python Tutorials

  Рет қаралды 61,768

Amulya's Academy

Amulya's Academy

4 жыл бұрын

In this Python Programming video tutorial you will learn to write program to calculate LCM of two numbers in detail.
In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by lcm, is the smallest positive integer that is divisible by both a and b.
GCD Program
• Python Tutorials - Pro...
#LCM #PythonPrograms
For more free tutorials on computer programming
/ amulsacademy
AmulsAcademy

Пікірлер: 88
@alokik
@alokik 3 жыл бұрын
Respected mam, you don't know that how much you are helping to the students like me.ThankYou mam.
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure 😊
@ashmitsrivastava5186
@ashmitsrivastava5186 4 жыл бұрын
I did it this way only a little change is there i hope you like it: n1 = int(input('Enter first number: ')) n2 = int(input('Enter second number: ')) a = 1 if n1>n2: l = n1 else: l = n2 while True: if n1>0: z = n1*a a+=1 if z%n2 == 0: print(z, ' is the LCM.') break else: print(0)
@rameenumer2212
@rameenumer2212 Жыл бұрын
This is your first video I saw and like, subscribed Because I like the way you teach us superb Keep it up Sister😊 👍
@jahnavi.m5728
@jahnavi.m5728 Жыл бұрын
Thank you so much mam for making us easily to understand the logic 👏👏
@prabathkotti9380
@prabathkotti9380 3 жыл бұрын
I like the way of teaching....thank you! expecting more videos from u
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@rrrrr296
@rrrrr296 2 жыл бұрын
this video is very helpful for us thank you so much mam :) and i request you to do a video on how to print pythogoras triplets in range of n numbers
@vabphogat6678
@vabphogat6678 Жыл бұрын
amazing explaination, thank you so much!
@SumitSinghzz
@SumitSinghzz 4 жыл бұрын
Glad to see your current video please drop the video on Linkedlist singly or double linked list
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Sure :)
@_ShivamGupta
@_ShivamGupta 7 ай бұрын
mam please keep uploading videos like this it helped me a lot ♥
@bhubeshsr6281
@bhubeshsr6281 4 жыл бұрын
actually i like these lectures.. my kind request you to create an telegram channel so we will get updates sa possible!!
@yourvibe2844
@yourvibe2844 3 жыл бұрын
ma'am please make python tutorials for tcs nqt coding section evryone is covering that topic using c, c++ no one's considering python, though python is the best language, i found this channel best for python ✌🏻💯
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Will try :)
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@kumarkailasanathan961
@kumarkailasanathan961 2 жыл бұрын
Excellent explanation.
@surajkumar-un8rn
@surajkumar-un8rn 2 жыл бұрын
It is very very helpful for me.
@ruchigupta7166
@ruchigupta7166 2 жыл бұрын
Mam please make a video on the program to find the smallest of 10 numbers entered, a sum of the digits of the smallest number, if it is an integer
@anuragjain3595
@anuragjain3595 2 жыл бұрын
Mam you are superb.Great respect from class 11 Tint Tots public school.
@seaofplatitudes780
@seaofplatitudes780 Жыл бұрын
That was beautiful!
@moviemania1021
@moviemania1021 3 жыл бұрын
Another way to solve this problem :) Btw your explanation was pretty good :) THE CODE: def lcm(n1, n2): value = max(n1, n2) n = 1 while True: ans = value * n if ans % n1 == 0 and ans % n2 == 0: print("The lcm of the program is ", ans, ".") break n += 1 n1 = int(input()) n2 = int(input()) lcm(n1, n2)
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@karthicksk3392
@karthicksk3392 3 жыл бұрын
@@AmulsAcademy mam i do like your code but i got an error in local variable help me pkz
@dibyaranjanbarik7987
@dibyaranjanbarik7987 3 жыл бұрын
Ur teaching style is awesome mam.
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thanks a lot :)
@BrendanMetcalfe
@BrendanMetcalfe 4 жыл бұрын
Hi Amul! Is it me or did your channel grow A LOT?? :) :)
@dibyaranjanbarik7987
@dibyaranjanbarik7987 3 жыл бұрын
Ur teaching style is awesome mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thanks a lot :)
@r.saiteja_raj386
@r.saiteja_raj386 Жыл бұрын
Thank you so much😇🤗
@ganaroyall3589
@ganaroyall3589 2 жыл бұрын
love u mam .. keep going.......on pythonnnnn
@sanchaykumar3343
@sanchaykumar3343 3 жыл бұрын
thanks, Amulya!
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure :)
@tubakhalid5222
@tubakhalid5222 3 жыл бұрын
Thank you so much !!!!
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure 😊
@shaluradhu1102
@shaluradhu1102 2 жыл бұрын
Clear explanation mam
@asafmohammed1045
@asafmohammed1045 4 жыл бұрын
Great explanation 😃
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@tecolote8566
@tecolote8566 4 жыл бұрын
THANK YOU.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
You're welcome!
@alokik
@alokik 3 жыл бұрын
Respected mam, my cognizant exam is scheduled after 15days and and I have also applied for TCS NQT. I want to crack both of the companies. Please guide me mam.. please 😅
@stalinromi1134
@stalinromi1134 3 жыл бұрын
Thank you
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
My Pleasure :)
@gayathridevip4632
@gayathridevip4632 3 жыл бұрын
When I put else block straight to while loop, it is not providing output. But in your another video, you have given else block straight to while loop. Can u explain mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
You can use else block with loops but first you need to understand it’s working 😊 Give me the program I will check 😊
@AbhishekKumar-jt6gn
@AbhishekKumar-jt6gn 3 жыл бұрын
superbb expalntion mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@arwaajkhan5905
@arwaajkhan5905 3 жыл бұрын
factors of n2 will always get 0 as modulo when performing : higher%n2 == 0,,,,,,, so its better to exclude this condition.
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
can you please start series of binary tress , linkedlist, graphs etc and python implementation?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Sure :)
@ritviksourab889
@ritviksourab889 Жыл бұрын
if you ever thought this was tough try this code.... import math print(math.lcm(x,y))
@jessierider5845
@jessierider5845 3 жыл бұрын
Ma'am , please clarify my doubt.. Which version of python you're using? Python 2 or 3???🥺🥺
@karthik9354
@karthik9354 3 жыл бұрын
3.7
@Krishnaveni-rf6pp
@Krishnaveni-rf6pp 2 жыл бұрын
Super..
@harishshelat4128
@harishshelat4128 2 жыл бұрын
Hello, I am new to Python programming. I am 71 years old and trying to learn Python for fun. I have one problem. I am trying to print pattern like "0 ,1, 2 , 3, 4 ,5 6, 7, 8, 9, 0, 1" depending on input from user. For example if user enters number of row=3 and number of column=5. Pattern should print 0 to 5 in first row,6 to 9 and remaining 0 and 1 in second row and remaining numbers 2,3,4,5,6,7 in thrid row. How do i accomplish this? I watched your several tutorials but unable to work it out. Thank you, Harish
@naveenmuchhandi2596
@naveenmuchhandi2596 3 жыл бұрын
nice explanation
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@Subbu-or2ep
@Subbu-or2ep Жыл бұрын
Super mam🥰😍
@francy4863
@francy4863 2 жыл бұрын
Vara level
@kanimozhisarathy8351
@kanimozhisarathy8351 Жыл бұрын
Super
@sujalmilind258
@sujalmilind258 4 жыл бұрын
I have created a program which can calculate both lcm and HCF of 3 no.s in less than 30 lines
@dibyaranjanbarik7987
@dibyaranjanbarik7987 3 жыл бұрын
then share the code
@shyamprakashm6325
@shyamprakashm6325 4 жыл бұрын
Why do you change amul's acadamy into amulya acadamy, ?
@rahulummadisetty8012
@rahulummadisetty8012 4 жыл бұрын
Amazing Explanation 🤗🤗
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@kirankatakamsetty368
@kirankatakamsetty368 2 жыл бұрын
When you executed 24 and 36, the lcm is 72 and I got the same, But when I execute 36 and 24, the lcm is 36
@telugutechtuts8986
@telugutechtuts8986 2 жыл бұрын
You did a mistake in your code bro... I am getting correct answer 72 for both cases
@rajeshgoruva4036
@rajeshgoruva4036 Жыл бұрын
your voice is super
@virupakshavegi4405
@virupakshavegi4405 2 жыл бұрын
Hi mam nice explanation but ur code is not working when one of the number is 0
@jaiveera9894
@jaiveera9894 4 жыл бұрын
please upload telugu videos madam
@adinathkolhapure6697
@adinathkolhapure6697 4 жыл бұрын
First viewer 😀😀😎
@kottakotaviswanadham5799
@kottakotaviswanadham5799 4 жыл бұрын
Plz teach pandas
@sivasundari9174
@sivasundari9174 4 жыл бұрын
Madam pls teach pandas
@leelapavankumaruddanti7796
@leelapavankumaruddanti7796 3 жыл бұрын
Voice kii flat nenu🤭🤭😍
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@rakeshdonthi9091
@rakeshdonthi9091 Жыл бұрын
I did this like this x = 0 while True: x += 1 if x % 24 == 0 and x % 36 == 0: break print(x)
@balakrishnavaidyanathan8572
@balakrishnavaidyanathan8572 Жыл бұрын
Any New python program
@priyanshkhare5997
@priyanshkhare5997 3 жыл бұрын
This is for the people in a time crunch : def Compute_LCM(n1,n2): if n1>n2: higher = n1 else: higher = n2 value = higher while True: if higher%n1==0 and higher%n2==0: print("LCM of", n1,"and",n2,"is",higher) break else: higher = higher+value n1=int(input("No.1 please:")) n2=int(input("No. 2 please:")) Compute_LCM(n1,n2)
@bryanhoangbach2255
@bryanhoangbach2255 2 жыл бұрын
Doesn't work
@khyber8455
@khyber8455 Жыл бұрын
the accent is hard to understand but explaination is great
@KumaranKM
@KumaranKM 2 жыл бұрын
a = 24 b = 36 ca = max(a, b) minn = min(a,b) count = 1 while True: if (ca * count) % minn == 0: print(ca * count) break count += 1
@DineshKumar-jt5tr
@DineshKumar-jt5tr 3 жыл бұрын
amulya ??did y like milk products??
@bryanhoangbach2255
@bryanhoangbach2255 2 жыл бұрын
There's a thing that can be improved: Please learn more English, because it's a bit hard to listen to what you meant or what you're saying.
@sigarkantishivasharanappa49
@sigarkantishivasharanappa49 3 жыл бұрын
Super
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
Python Tutorials - Program To Find out the GCD of Two Positive Numbers
13:11
Русалка
01:00
История одного вокалиста
Рет қаралды 6 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 138 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 57 МЛН
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 7 МЛН
Python Tutorial - Prime Numbers | Printing Prime Numbers in Given Interval
18:33
Python Program #27 - Find LCM using while loop in Python
7:18
Programming For Beginners
Рет қаралды 2,8 М.
Python Pattern Program - Number Pattern (Printing Numbers in Pyramid Shape)
11:28
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 277 М.
Python Tutorial - Fibonacci Series
13:49
Amulya's Academy
Рет қаралды 183 М.
Leap Year Program | Python Tutorials
12:12
Amulya's Academy
Рет қаралды 75 М.
HCF/GCD of Two Numbers Python Program
8:23
WsCube Tech
Рет қаралды 24 М.
Русалка
01:00
История одного вокалиста
Рет қаралды 6 МЛН