<jupyter_start><jupyter_text>Functions are used to solve problems<jupyter_code># Find out if the word "Dog" is in a string
def check_string(mystring):
    if 'dog' in mystring.lower():
        return True
    else:
        return False
check_string('Hey Dog is present?')
'dog' in 'dog ran away'
'dog' in 'dog ran away'<jupyter_output><empty_output><jupyter_text>The avobe method was beginer method def string_check(mystring):    return 'dog' in mystring.lower()<jupyter_code>string_check('hey there was a Dog There')
#PIGLATIN PROBLEM
#if the word starts with a vowel add ay to end
#if the word is an consonent then put first letter to end 
# and add ay
#input: word
#output: ordway
def pig_latin(word):
    first_letter=word[0]
    
    # check if vowel
    if first_letter in 'aeiou':
        pig_word = word + 'ay'
    else:
        pig_word= word[1:] + first_letter + 'ay'
    
    return pig_word
    

pig_latin('Aniket')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09498956158663883, 'fraction_numerical': 0.0020876826722338203, 'mean_word_length': 3.8434343434343434, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '416095', 'license': 'MIT', 'n_tokens_mistral': 344, 'n_tokens_neox': 337, 'n_words': 110, 'path': 'trial scripts/Functions.ipynb', 'repo_name': 'anarchymonkey/Capstone-Projects', 'size': '958'}