Program to calculate HCF/GCD of two numbers | Python Programming | #anjaliluthra

preview_player
Показать описание
Facebook Page :

Complete Study Material for Class 12 CS

Complete Study Material for Class 12 IP

Complete Study material for BCA Entrance Exam :

Рекомендации по теме
Комментарии
Автор

print("enter two nos to calculate hcf")
a=int(input("enter first no. "))
b=int(input("enter second no. "))
if(a>b):
while a %b != 0:
rem=a%b
a=b
b=rem
print(" HCF is ", b)

else:
while b%a !=0:
rem=b%a
b=a
a =rem
print(" HCF is", a)

aries
Автор

Thanks so much for this video.... Mam... 👍👍

vishalmishra
Автор

Mam really you are superb... 💕💕👍🏻👍🏻 The way you like teach us is very interesting... 👍🏻👍🏻

SagarPawar-nqpr
Автор

You made difficult path easier. Thank you so much @Anjali Luthra mam!

nehakhanzode
Автор

But this program is "wrong" when we take two numbers whose HCF is 1, like HCF of 6 and 7 and etc etc..

ritam
Автор

Very well explained thank you so much ma'am🙂🙂🙂🙂

AkashYadav-xbuy
Автор

Hi mam very nice informing python language.

deadiusgaming
Автор

Simple interest, prime numbers, fabonacii series, compound interest, factorial issee bataiye mam

adarshkanojia
Автор

Congratulations on 9k subscribers mam... 10k soon... 😊💓 Love u a lot mam... Thank-you

madhvendra
Автор

Mam plzzz series par videos bnayi plz..mere sir bhout series par ques dete h..jese aese series dete h muje kch smj nahi aata or youtube par kisi bhi channel par series ni karate h plzz mam help me out plzz

suchitakumari
Автор

What if I enter first number smaller than second number .. I believe we should first check smaller number and then run the while loop.

supriyomondol
Автор

Shorter


def GCD(a, b):
return a if b==0 else GCD(b, a%b)



If anyone is obsessed with shortcode :))

kacpermokrzycki
Автор

Mam pahle theory pade ya programmes dhekhe

VikasKumar-myrr
Автор

if B>A in that case what will we do

adityasethi
Автор

How to do program when number are more than two numbers????

rakeshpatil
Автор

Ma'am this all video is enough for class 12th board 2020 plzz tell me🤔

RITESHKUMAR-fnrh
Автор

Mam can you please upload how can we implement Bayes theorem using python

rudranshvyas
Автор

mam it's showing error when i write rem...can you pls tell what should i do?

ssmodani
Автор

Ma'am how can we do this program using recursion

srishtipandey
Автор

HCF recursion se bi kr skte h
HOW
can u please upload the video in which I learn computing GCD recursively...

syed.
welcome to shbcf.ru