diff --git a/1.GCD.py b/1.GCD.py new file mode 100644 index 0000000..2cfe030 --- /dev/null +++ b/1.GCD.py @@ -0,0 +1,16 @@ +# define a function +def computeGCD(x, y): +# Find and choose the smaller number + if x > y: + smaller = y + else: + smaller = x + for i in range(1, smaller+1): + if((x % i == 0) and (y % i == 0)): + gcd = i + return gcd +str1=input("Enter first number: ") +num1 = int(str1) +str2=input("Enter second number: ") +num2 = int(str2) +print("The G.C.D. of", num1,"and", num2,"is", computeGCD(num1, num2)) diff --git a/README.md b/README.md index 610b891..79d8cc3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,35 @@ # python -This repository have python programming codes from "PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY" based on Anna University Syllabus. -The python codings based on Regulation- 2017 is stored in the branch python-2017 -The python codings based on Regulation- 2021 is stored in the branch python-2021 +This repository have python programming codes from "PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY" based on Anna University Syllabus Regulation 2017. + +The python codings based on Regulation- 2017 is stored in the branch python_reg_2017 + If you have any queries You can contact me at "erudite31.wordpress.com" (or) "erudite31.wp@gmail.com" + +Syllabus - Regulation 2017 + +1. Compute the GCD of two numbers. + +2. Find the square root of a number (Newton’s method) + +3. Exponentiation (power of a number) + +4. Find the maximum of a list of numbers + +5. Linear search and Binary search + +6. Selection sort, Insertion sort + +7. Merge sort + +8. First n prime numbers + +9. Multiply matrices + +10. Programs that take command line arguments (word count) + +11. Find the most frequent words in a text read from a file + +12. Simulate elliptical orbits in Pygame + +13. Simulate bouncing ball using Pygame + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy