Course: Applied OO Programming Part 1 Write a program (homework_part1.py) that prompts the user to enter the
Question:
Course: Applied OO Programming
Part 1 Write a program (homework_part1.py) that prompts the user to enter the name of a file (example: my_poem.txt) containing lines of text. The program will perform the following actions:
1. Display the contents of the file as a list. 2. Search for and display all words that begin with a vowel.
Include the following in your program logic 1. A function, read_file, that opens and reads the content of the file into a list. read_file function takes the name of the file as a parameter. It reads the contents of the file into a list and returns the list. 2. A function, vowel_words, that takes the list containing the contents of the file and returns a list containing words that begin with a vowel.
Part 2 Write a test case module (unittest_vowel_words.py) for the vowel_words function. The module will include the following: 1. Import the module for Part1 (homework_part1). 2. Test case class that tests the vowel_words function. The class will include a test method, test_vowel_words. 3. Logic in the test_vowel_words method for testing/validating the vowel_words function. 4. Main logic that executes the test case.
Part 1 Example:
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang