From c25cd95b98fd07eb36cf1d84409160e403ca9aca Mon Sep 17 00:00:00 2001 From: mrgsravanthi Date: Sun, 5 Mar 2023 11:16:58 +0530 Subject: [PATCH 1/2] changed addition.py --- addition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition.py b/addition.py index e184760..0531013 100644 --- a/addition.py +++ b/addition.py @@ -2,6 +2,6 @@ num2 = int(input("Enter second number: ")) # addition -result = num1 * num2 +result = num1 + num2 print("The sum of", num1, "and", num2, "is", result) From 69bfd9021cd0bcb203f4b71bed1fb224c5313e30 Mon Sep 17 00:00:00 2001 From: mrgsravanthi Date: Sun, 5 Mar 2023 12:23:16 +0530 Subject: [PATCH 2/2] fixed gcd.py --- gcd.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcd.py b/gcd.py index 3c39d8d..e6d8bdd 100644 --- a/gcd.py +++ b/gcd.py @@ -2,6 +2,11 @@ num2 = int(input("Enter second number: ")) # greatest common divisor -result = num1 + num2 +m=max(num1,num2) +n=min(num1,num2) +for i in range(1,n+1): + if(m%i==0 and n%i==0): + result=i + print("The GCD of", num1, "and", num2, "is", result)