<jupyter_start><jupyter_text>1. Capitalize<jupyter_code>'<NAME>'.capitalize()
def capitalize_(txt):    
    t = ''   
    if (ord(txt[0]) >= 97 and ord(txt[0]) <= 122):         # It first character is not uppercase
        t = chr(ord(txt[0]) - 32)                          # Converting lowercase to uppercase
    else:
        t = txt[0]                                         # If first character is already uppercase
      
    for i in txt[1:]:                                      # Characters after first character
        if (ord(i) >= 65 and ord(i) <= 90):                # If character is uppercase
            t += chr(ord(i) + 32)                          # Converting uppercase to lowercase           
        else: 
            t += i                                         # Taking it as it is        
    return t                                               # Returning the text

capitalize_('<NAME>')<jupyter_output><empty_output><jupyter_text>2. Lower<jupyter_code>'<NAME>'.lower()
def lower_(txt):
    
    t = ''
    for i in txt:
        if (ord(i) >= 65 and ord(i) <= 90):
            t += chr(ord(i) + 32)
        else:
            t += i
    return t

lower_('<NAME>')<jupyter_output><empty_output><jupyter_text>3. Upper<jupyter_code>'<NAME>'.upper()
def upper_(txt):
    
    t = ''
    for i in txt:
        if (ord(i) >= 97 and ord(i) <= 122):
            t += chr(ord(i) - 32)
        else:
            t += i
    return t

lower_('<NAME>')<jupyter_output><empty_output><jupyter_text>4. isdigit<jupyter_code>'2'.isdigit()
def isdigit_(ch):
    
    if (ord(ch) >= 48  and  ord(ch) <= 57):
        return True
    else:
        return False<jupyter_output><empty_output><jupyter_text>5. isalnum (If Alpha-Numeric)<jupyter_code>'A'.isalnum()
def isalnum_(ch):
                    # Numeric                            Lowercase                           Uppercase
    if (ord(ch) >= 48 and ord(ch) <= 57) or (ord(ch) >= 97 and ord(ch) <= 122) or (ord(ch) >= 65 and ord(ch) <= 90):
        return True
    else:
        return False
    
isalnum_('@')<jupyter_output><empty_output><jupyter_text>6. title<jupyter_code>'<NAME> is a'.title()
def title_(txt):
    
    t = ''
    
    for word in txt.split(' '):
        
        if (len(word) == 1):
            t += upper_(word) + ' '
            
        else:
            temp = upper_(word[0]) + word[1:] + ' '
            t += temp
            
    return t[:-1]

title_('<NAME> is a mentor')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13754498200719711, 'fraction_numerical': 0.023590563774490203, 'mean_word_length': 1.576725025746653, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '641033', 'license': 'Apache-2.0', 'n_tokens_mistral': 866, 'n_tokens_neox': 809, 'n_words': 191, 'path': 'Week - 5/DIY Libraires - String Operations/String Operations using Functions .ipynb', 'repo_name': 'AshishJangra27/Data-Science-Specialization', 'size': '2557'}