use py only
Complete the remove_0dd_multiples( ) function that takes two parameters: 1. An integer list numbers_list. 2. An integer multiple_of. The function should remove all integer elements in numbers_list that are odd and multiples of the parameter multiple_of. Note that this function is altering the parameter list numbers_list. It does not create or return a new list. Some examples of the function being called are shown below. For example: numbers_list = [1, 5, 23, 3, 6, 17, 9, 18] Before: [1, 5, 23, 3, 6, 17, 9, 18] print("Before:", numbers_list) After: [1, 5, 23, 6, 17, 18] remove_odd_mu1tip1es(numbers_list, 3) print("After:", numbers_list) numbers_list = [10, 20, 30, 50, 5430] Before: [10, 20, 30, 50, 5430] print("Before:", numbers_list) After: [10, 20, 30, 50, 5430] remove_odd_mu1tip1e5(numbers_list, 5) print("After:", numbers_list) Complete the get_unique_words ( ) function that takes a single string parameter called text. This string contains words separated by a single space character. Some words will end with punctuation. You can assume that text will contain at least 1 word, and that the only punctuation used will be: , . ! ? ; The function should convert all the alphabetical characters in text to lowercase. The function should then return a list of all the unique words in text sorted alphabetically. Words that end in punctuation should have that punctuation removed. Some examples of the function being called are shown below. For example: Test Result text = "The quick brown fox jumps over the lazy dog!" The unique words are: ['brown' , 'dog', 'fox', 'jumps', 'lazy', 'over', 'quick', 'the' ] print("The unique words are:", get_unique_words (text) ) text = "Around the world, around the world." The unique words are: ['around', 'the', 'world' ] print ("The unique words are:", get_unique_words(text) ) text = "Spanish bombs, yo te quiero infinito. Yo te quiero, oh mi corazon." The unique words are: ['bombs', 'corazon', ' 'infinito', 'mi', 'oh', 'quiero', 'spanish', 'te', 'yo' ] print ("The unique words are:", get_unique_words (text) )Complete the add_adjacent_list_values ( ) function that takes a list of numerical values as a parameter named numbers_list. If the list has 2 or more elements, then each element of the list is updated so that it is equal to the sum of itself and the next element. In other words, the first element will be updated so that it has the value of the sum of the first and second elements. The second element will be updated so that it has the value of the sum of the second and third elements and so on. The last element of the list is updated, so that it has the value of the sum of itself and the original value of the first element. If the list has less than 2 elements, it remains unchanged. Note, that the function does not return a new list - the parameter list is modified within the function only. Some examples of the function being called are shown below. For example: Test Result numbers_list = [1, 2, 3 , 4, 5] Before: [1, 2, 3, 4, 5] print ("Before:", numbers_list) After: [3, 5, 7, 9, 6] add_adjacent_list_values (numbers_list) print ("After:", numbers_list) numbers_list = [2.5, 3] Before: [2.5, 3] print ("Before:", numbers_list) After: [5.5, 5.5] add_adjacent_list_values (numbers_list) print ("After:", numbers_list) numbers_list = Before: print ("Before:", numbers_list) After: add_adjacent_list_values (numbers_list) print ("After:", numbers_list)Define the get_fail_pass_ave rage( ) function which is passed a list of integers called number_list as a parameter where each integer represents a mark out of 100. The function returns a Python list made up of the average of all the marks which are less than 50, followed by the average of all the marks which are 50 or more (both averages are rounded to the nearest whole number). If there are no fail marks then the average fail mark should be set to 1 and if there are no pass marks then the average pass mark should be set to 1. Some examples of the function being called are shown below. For example: m print(get_fail_pass_average([63, 65, 331)) [33, 64] print(get_fail_pass_average([33, 42, 20, 101)) [26, -1] print(get_fail_pass_averagel[63, 62, 100, 1001)) [-1, 81] Complete the calculate_average_positive_temperature ( ) function that takes two parameters: 1. An integer list of temperatures called temperature list. 2. An integer sentinel_value. The function should calculate and return the average of all the positive temperatures in temperature_list until a temperature greater than or equal to the sentinel_value is encountered. The average should be returned rounded to the nearest 2 decimal places. Some things to note: . If a temperature that is greater than or equal to the sentinel_value is not found in temperature_list, then the average of all the positive temperatures in temperature_list should be returned. . If there are no positive temperatures in temperature_list, or if the sentinel_value is met or exceeded prior to encountering a positive temperature, then the function should return 0.0 as the average temperature. . A temperature of 0 should be counted as a positive temperature for the purposes of this function. Some examples of the function being called are shown below. For example: Test Result temperature_list = [23, 12, 13, -5, -13, 7, 31, -2, 1, 4, 5] Average temperature: 13.75 print ("Average temperature:", calculate_average_positive_temperature( temperature_list, 30)) temperature_list = [-13, -14, -17, -9, 5, 1, 2, 3, 4] Average temperature: 0.0 print ("Average temperature:", calculate_average_positive_temperature ( temperature_list, 5))Define the get_longest_two_s_word( ) function which is passed a list of strings called word_list as a parameter. The function returns the word in the list which has the most characters (i.e., the longest word) BUT only words which have 5 or more characters and contain at least two 's' (or 'S') characters. If two or more words in the list have the same number of characters as the longest word and both contain at least two 's' characters, the function should return the first word from the start of the list which has the most characters. If the parameter list is empty or if there are no 5 letter or longer words in the list which contains at least two 's' characters, the function should return the empty string. Some examples of the function being called are shown below. Hint: Defining a helper function to count the number of "S" and "s" characters in a string would be useful. For example: Test Result print("1.", get_longest_two_s_word( ["posters", "cases", "tenses", "digests", "gaseous"]) ) 1. posters print ("2.", get_longest_two_s_word( ["Jo", "Jessy", "Penelope", "Jin", "Raeann", "Susan"] ) ) 2. Jessy print ("3. ", "***", get_longest_two_s_word( ["Alan", "Melita", "Amity", "Rosalia", "Rositta", "LeeAnne"] ), "***", sep = "") 3. * ***** print ("4. ", "***", get_longest_two_s_word( ["pass", "less", "sows", "mess", "saps", "Jess"]), "***", sep = "") 4. ****** print ("5. ", "***", get_longest_two_s_word( ), "***", sep = "") 5 . * ***** print ("6. ", "***" + get_longest_two_s_word( ["ShuSHI !"] ) + "***") 6. ***ShuSHI !***Define the is_a_valid_date() function which is passed a string date as a parameter. The function returns a boolean indicating whether the parameter string is a valid date or not. The first two lines of the function are: month_names ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "Novembe days_in_month = [31, 28. 31, 30, 31, 3B, 31, 31, 30, 31, 30, 31] where month_names is a list of valid month names, and days_in_month is a list which contains the maximum day number for each month (note that February is set to 28 days), e.g. the third element of the month_names list is the month of March and the corresponding third element of the days_in_month list indicates that there are 31 days in March. Notes - The parameter string can contain any number of spaces but the month name must always start at the first nonspace character from the beginning of the string. - The day number part of the date string to be tested could contain alphabetic characters thus making the date string invalid. You will find it useful to use the string method, isdigit( ), which returns True if a string is made up of digits, False otherwise. Some examples of the function being called are shown below. For example: Test print("1.", is_a_val.id_date("January 21")) print("2.", is_a_valid_date("Auust 3"\" print("3.", is_a_valid_date(" June 153 ")l print(\"4.\Define the is_a_val.id_code( ) function which is passed a string code as a parameter. The function returns a boolean indicating whether the parameter string is a valid code or not. A valid code is a string made up of one letter followed by one or more digits (can also include spaces before, between or after the digits). The first three lines of code inside the function should be: C0de_1etter5 = [IISII' \"B", \"N", \"T", IIPII] min_for_each_letter = [1, 3, 4, 0, 3] #inclusive max_for_each_letter = [7, 9, 6, 7, 5] #inclusive where: . code_letters is the list of code letters which are valid for the first letter of the code string, - min_for_each_letter is a list which contains the minimum possible number (inclusive) for each digit following that letter, - max_for_each_letter is a list which contains the maximum possible number (inclusive) for each digit following that letter. For example, the third element of the codeJetters list is the letter 'N', the corresponding third element of the min_for_each_letter list is 4 and the corresponding third element of the max_for_each_letter list is 6. This indicates that the code digits which follows the letter 'N' can be any number made up of the digits 4, 5 or 6. The number part of a valid code string can also contain any number of spaces. Note: The number part of a parameter code string to be tested could contain an alphabetic character thus making the code not valid. You will find it useful to use the string method, isdigi), which returns True if a string is a digit, False otherwise. Some examples of the function being called are shown below. For example: Test Result print("1. ", is_a_valid_code( '3747345' )) print("2.". is_a_val.id_code('N 444 454')) print("3.", is_a_va'l.id_code('T 4% 4654'\" print("4.", is_a_valid_code('5 4445454')) print("5.". is_a_val.id_code('P ')l print("6.", is_a_va'l.id_code('T 0 'l) In a dice rolling game a player's hand is made up of any number of random dice rolls and is valued in the following way: - In this game a run is a sequence of dice values starting from 1, egg. 123, 12345, 1234, 1. . Each dice which is part of a run of dice starting from a 1 has a value which is equivalent to the dice number. The value of any dice which is part of a run is added to the hand score. - If there is no 1 in a hand of dice, the score for the whole hand is 0. - A hand of dice can contain more than one run. Study the following example hands of dice and their corresponding valuation. Make sure you understand how the hands are valued: [5. 3. 2. 5. 4. 5, G, 4, 3] has value a [3, 4, 1, 5, 3, 1, 4, 6] has value 2 (contains one run with just the dice [1] and a second run with just [1]) [5, 3, 2, 2, 6, 4, 5, 1, 4] has value 21 (contains one run with the dice [1, 2, 3, 4, 5, 6]) [2, 1, 1, 1, 2, 3. 3, 1, 3, 2] has value 19 (contains three separate runs with the dice [1, 2, 3] and a second run with the dice [1] [3, 4, 1, 5, 2, 1, 5, 1, 2, 3, 4, 6] has value 37 (contains one run with the dice [1, 2, 3, 4, 5, 6], a second run with [1, 2, 3, 4, 5] and a third run with tl'H Define the get_d ice_Sc0 rel ) function which is passed a list of dice rolls called dice_roll_1ist and returns the value of the hand according to the rules described above. IMPORTANT: your code should not change the parameter list (i.e. you need to make a copy of the parameter list and manipulate the copy). Some examples of the function being called are shown below. For example: print("1:", get_dice_score([5, 3, 2, 5, 4, 5, 6, 4, 3H) 1: 0 print("2: get_dice_score([3, 4, 1, 5, 3, 1, 4, 6H) 2: 2 print("3:", get_dice_score([5, 3, 2, 2, 6, 4, 5, 1, 4])) 3: 21 print("4:", get_dice_score([2, 1, 1, 1, 2, 3, 3, 1, 3, 2]\" 4: 19 printl"5:\". get_dice_score([3. 4. 1. 5. 2. 1. S. 1. 2. 3. 4. 61)) 5: 37 print("6:", get_dice_score()) 5: 9