<jupyter_start><jupyter_text>Helper Methods The greatest common divisor (gcd/GCD), or the greatest common factor (gcf), or highest common factor (hcf), of two or more integers (at least one of which is not zero), is the largest positive integer that divides the numbers without a remainder.greatest common divisor calculate: https://www.hackmath.net/en/calculator/greatest-common-divisordivisors calculate: https://www.hackmath.net/en/calculator/divisors  Gretest Common Divisor (gcd) is a example of HELPER METHOD<jupyter_code>def gcd(a,b): 
    if a > b: a,b = b,a
    while True:
        if b % a == 0: return a
        a, b = b%a, a
class Fraction(object):
    def __init__(self, a, b):
        if( gcd(a,b) > 1):
            self.d =  gcd(a,b) 
            
    def answer(self):
        return self.d
# Divisors of 12 are 1, 2, 3, 4, 6,   12      
# Divisors of 8  are 1, 2,    4,    8         
# ANSWER IS : 4           
f = Fraction(8,12)

print ( ' GCD (8,12) = {}'.format ( f.answer() ))

# Divisors of 6 are 1,2,3,  6
# Divisors of 8 are 1,2,  4,  8
f = Fraction(6,8)

print ( ' GCD (6,8) = {}'.format ( f.answer() ) )<jupyter_output>GCD (6,8) = 2
{'fraction_non_alphanumeric': 0.12953367875647667, 'fraction_numerical': 0.03454231433506045, 'mean_word_length': 2.7266881028938905, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '366039', 'license': 'MIT', 'n_tokens_mistral': 464, 'n_tokens_neox': 427, 'n_words': 143, 'path': 'AdvanceTopics/Helper Methods.ipynb', 'repo_name': 'cusey/PythonExamples', 'size': '1158'}