Order the answer to: Write three Python functions that…
Question | Write three Python functions that accept a list of string items as parameter. The first function should return the first item in the list whose length is divisible by 3. The second function should return the last item in the list with more than 4 characters. The third function should replicate the list by 3 and output one entry per line all the items with odd number of characters. In the main program, interactively create a list of 5 string items (words, sentences etc) of varying length. Present the user with a set of menu to select from. If the user entersthe character ‘F’ or ‘f’, the program should output the first item whose length is divisible by 3. When the user enters the character ‘L’ or ‘l’, the program should output the last item with more than 4 characters. When the user enters any number, the program should perform the replication and output the items with odd number of characters. The program should go back to the menu options for new selection. When the user enters ‘E’ or ‘e’, the program should terminate with a goodbye messag |
---|---|
Subject | python programming |
Have a writer answer this question by clicking below. If you have any questions you can contact us via live chat.