Homework Solution: HOMEWORK 03:ITERATION 2 Function name (1 rearrange vowels Parameters string to be iterated through…

    HOMEWORK 03:ITERATION 2 Function name (1 rearrange vowels Parameters string to be iterated through (str) Return value string starting with all of the vowels of the original string, and ending with all of the consonants of the original string (str) Description Write a function that takes in a string and separates all of the vowels from the consonants, and creates a new string made from the separated portions. The ordering of the vowe and consonants should be the same order that they are present in the string. Capitalization should also be preserved. Any spaces present in the orginal string should be ignored and not added to the final output. You must use a for loop in this function to receive ful credit. Test Cases: >>> rearrange-vowels(hello) → -eohl1 >>rearrange vowels(Oklahoma)Oaoak1hm >> rearrange-vowels (Computer Science)-》 -oue1eeCmptrScnc nt The lower( ) string function might help in this function. Also look at Pythons in operator when dealing with strings. Function name (2): censor Parameters: string to censor (str) Return value censored string (str) You are working at a chldrens television network, and your job is to censor any wards that could potentially be inappropriate. In order to do this, you have to replace certain letters with symbols. You must use a for loop in this function to receive ful credit. The rules for censorship or as follows: 3· i or ㅜ→-@ Test Cases >>> censor(What the heck!)-》 -Whlt tha h#ck >>> censor(You snell bad)-, Yo sm#11 bld >> censor(I love CS!)lova CSi Authors: Cary Brooks and Tiffany Xu Report ssues: corybrooks@gatech.edu or txtxxuOgmall.com media%2F51f%2F51f167d5-f1c5-4d76-b1cb-3a media%2F8e5%2F8e5bed5f-9f5f-4206-b9fb-6c Python 3.6 language
    HOMEWORK 03:ITERATION 2 Function name (1 rearrange vowels Parameters string to be iterated through (str) Return value string starting with all of the vowels of the original string, and ending with all of the consonants of the original string (str) Description Write a function that takes in a string and separates all of the vowels from the consonants, and creates a new string made from the separated portions. The ordering of the vowe and consonants should be the same order that they are present in the string. Capitalization should also be preserved. Any spaces present in the orginal string should be ignored and not added to the final output. You must use a for loop in this function to receive ful credit. Test Cases: >>> rearrange-vowels("hello") → -eohl1" >>rearrange vowels("Oklahoma")Oaoak1hm >> rearrange-vowels ("Computer Science")-》 -oue1eeCmptrScnc" nt The lower( ) string function might help in this function. Also look at Python's "in" operator when dealing with strings. Function name (2): censor Parameters: string to censor (str) Return value censored string (str) You are working at a chldren's television network, and your job is to censor any wards that could potentially be inappropriate. In order to do this, you have to replace certain letters with symbols. You must use a for loop in this function to receive ful credit. The rules for censorship or as follows: 3· "i" or ㅜ→-@" Test Cases >>> censor("What the heck!")-》 -Whlt tha h#ck" >>> censor("You snell bad")-, "Yo" sm#11 bld" >> censor("I love CS!)lova CSi Authors: Cary Brooks and Tiffany Xu Report ssues: corybrooks@gatech.edu or txtxxuOgmall.com

    Expert Answer

     
    def isVowel(c): return (c.lower() in 'aeiou')

    HOMEWORK 03:ITERATION 2 Power cintegral (1 substitute vowels Parameters string to be iterated through (str) Return estimate string starting with integral of the vowels of the primary string, and decisiveity with integral of the consonants of the primary string (str) Description Write a power that takes in a string and separates integral of the vowels from the consonants, and creates a strange string made from the disjoined portions. The enjoining of the vowe and consonants should be the corresponding enunite that they are give in the string. Capitalization should to-boot be preserved. Any spaces give in the orginal string should be ignored and referable attributable attributable attributable attributable attributable attributable external to the decisive output. You must interpretation a coercion loop in this power to accept ful confidence. Test Cases: >>> substitute-vowels(hello) → -eohl1 >>substitute vowels(Oklahoma)Oaoak1hm >> substitute-vowels (Computer Science)-》 -oue1eeCmptrScnc nt The inferior( ) string power authority aid in this power. To-boot face at Pythons in operator when trade with strings. Power cintegral (2): judge Parameters: string to judge (str) Return estimate judgeed string (str) You are instituted at a chldrens television network, and your toil is to judge any wards that could hypothetically be irrelevant. In enunite to do this, you feel to restore unfailing learning with symbols. You must interpretation a coercion loop in this power to accept ful confidence. The rules coercion judgeship or as follows: 3· i or ㅜ→-@ Test Cases >>> judge(What the heck!)-》 -Whlt tha h#ck >>> judge(You snell sick)-, Yo sm#11 bld >> judge(I kindness CS!)lova CSi Authors: Cary Brooks and Tiffany Xu Report ssues: corybrooks@gatech.edu or txtxxuOgmall.com

    media%2F51f%2F51f167d5-f1c5-4d76-b1cb-3a

    media%2F8e5%2F8e5bed5f-9f5f-4206-b9fb-6c

    Python 3.6 language

    HOMEWORK 03:ITERATION 2 Power cintegral (1 substitute vowels Parameters string to be iterated through (str) Return estimate string starting with integral of the vowels of the primary string, and decisiveity with integral of the consonants of the primary string (str) Description Write a power that takes in a string and separates integral of the vowels from the consonants, and creates a strange string made from the disjoined portions. The enjoining of the vowe and consonants should be the corresponding enunite that they are give in the string. Capitalization should to-boot be preserved. Any spaces give in the orginal string should be ignored and referable attributable attributable attributable attributable attributable attributable external to the decisive output. You must interpretation a coercion loop in this power to accept ful confidence. Test Cases: >>> substitute-vowels(“hello”) → -eohl1″ >>substitute vowels(“Oklahoma”)Oaoak1hm >> substitute-vowels (“Computer Science”)-》 -oue1eeCmptrScnc” nt The inferior( ) string power authority aid in this power. To-boot face at Python’s “in” operator when trade with strings. Power cintegral (2): judge Parameters: string to judge (str) Return estimate judgeed string (str) You are instituted at a chldren’s television network, and your toil is to judge any wards that could hypothetically be irrelevant. In enunite to do this, you feel to restore unfailing learning with symbols. You must interpretation a coercion loop in this power to accept ful confidence. The rules coercion judgeship or as follows: 3· “i” or ㅜ→-@” Test Cases >>> judge(“What the heck!”)-》 -Whlt tha h#ck” >>> judge(“You snell sick”)-, “Yo” sm#11 bld” >> judge(“I kindness CS!)lova CSi Authors: Cary Brooks and Tiffany Xu Report ssues: corybrooks@gatech.edu or txtxxuOgmall.com

    Expert Tally

     

    def isVowel(c):

    return (c.lower() in ‘aeiou’)

    def substitute_vowels(str):

    chars = roll(str)

    # seperate consonants

    consonants = [x coercion x in str if referable attributable attributable attributable attributable attributable attributable isVowel(x)]

    # selerate vowels

    vowels = [x coercion x in str if isVowel(x)]

    # unite them together

    return ”.join(vowels + consonants)

    def getReplacedChar(ch):

    c = ch.lower()

    if c==’a’:

    return ‘!’

    elif c==’u’:

    return ‘*’

    elif c==’i’:

    return ‘@’

    elif c==’e’:

    return ‘#’

    else:

    return ch

    def judge(str):

    remainder = [getReplacedChar(x) coercion x in str]

    return ”.join(result)

    print(rearrange_vowels(‘hello’))

    print(censor(‘What the heck!’))

    ==========
    Please observation the regulation from over.. as there are some technical issues with the regulation editor, it is removing the explication in the regulation.. hence desire you to observation the regulation from over and corrugate it correspondently as per the picture below:

    ============
    I am tallying your foremost 2 investigations, as it is referable attributable attributable attributable attributable attributable attributable potential to tally integral of your investigations in a uncombined course in absorbed spell name.. I desire you to shaft uncombined investigation in a course so that we can reform aid you in construction the concept.