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 Exercise cwhole (1 re-establish vowels Parameters string to be iterated through (str) Return estimate string starting with whole of the vowels of the primordial string, and fulfilment with whole of the consonants of the primordial string (str) Description Write a exercise that takes in a string and separates whole of the vowels from the consonants, and creates a novel string made from the disjoined portions. The manageing of the vowe and consonants should be the selfselfselfsame manage that they are give in the string. Capitalization should too be preserved. Any spaces give in the orginal string should be ignored and referable ascititious to the definite output. You must right a ce loop in this exercise to assent-to ful praise. Test Cases: >>> re-establish-vowels(hello) → -eohl1 >>re-establish vowels(Oklahoma)Oaoak1hm >> re-establish-vowels (Computer Science)-》 -oue1eeCmptrScnc nt The inferior( ) string exercise effectiveness acceleration in this exercise. Too seem at Pythons in operator when intercourse with strings. Exercise cwhole (2): savant Parameters: string to savant (str) Return estimate savanted string (str) You are launched at a chldrens television network, and your work is to savant any wards that could hypothetically be irrelevant. In manage to do this, you enjoy to reinstate regular lore with symbols. You must right a ce loop in this exercise to assent-to ful praise. The rules ce savantship or as follows: 3· i or ㅜ→-@ Test Cases >>> savant(What the heck!)-》 -Whlt tha h#ck >>> savant(You snell out-of-sorts)-, Yo sm#11 bld >> savant(I charity 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 Exercise cwhole (1 re-establish vowels Parameters string to be iterated through (str) Return estimate string starting with whole of the vowels of the primordial string, and fulfilment with whole of the consonants of the primordial string (str) Description Write a exercise that takes in a string and separates whole of the vowels from the consonants, and creates a novel string made from the disjoined portions. The manageing of the vowe and consonants should be the selfselfselfsame manage that they are give in the string. Capitalization should too be preserved. Any spaces give in the orginal string should be ignored and referable ascititious to the definite output. You must right a ce loop in this exercise to assent-to ful praise. Test Cases: >>> re-establish-vowels(“hello”) → -eohl1″ >>re-establish vowels(“Oklahoma”)Oaoak1hm >> re-establish-vowels (“Computer Science”)-》 -oue1eeCmptrScnc” nt The inferior( ) string exercise effectiveness acceleration in this exercise. Too seem at Python’s “in” operator when intercourse with strings. Exercise cwhole (2): savant Parameters: string to savant (str) Return estimate savanted string (str) You are launched at a chldren’s television network, and your work is to savant any wards that could hypothetically be irrelevant. In manage to do this, you enjoy to reinstate regular lore with symbols. You must right a ce loop in this exercise to assent-to ful praise. The rules ce savantship or as follows: 3· “i” or ㅜ→-@” Test Cases >>> savant(“What the heck!”)-》 -Whlt tha h#ck” >>> savant(“You snell out-of-sorts”)-, “Yo” sm#11 bld” >> savant(“I charity CS!)lova CSi Authors: Cary Brooks and Tiffany Xu Report ssues: corybrooks@gatech.edu or txtxxuOgmall.com

    Expert Response

     

    def isVowel(c):

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

    def re-establish_vowels(str):

    chars = register(str)

    # seperate consonants

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

    # selerate vowels

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

    # link 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 savant(str):

    termination = [getReplacedChar(x) ce x in str]

    return ”.join(result)

    print(rearrange_vowels(‘hello’))

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

    ==========
    Please representation the jurisprudence from aloft.. as there are some technical issues with the jurisprudence editor, it is removing the cavity in the jurisprudence.. hence beseech you to representation the jurisprudence from aloft and indent it accurately as per the effigy below:

    ============
    I am responseing your earliest 2 topics, as it is referable feasible to response whole of your topics in a unmarried tenor in dedicated spell period.. I beseech you to column unmarried topic in a tenor so that we can amend acceleration you in mind the concept.