Question: CSIS 153 Fall 2016 Python Program 7 Write a program that processes a text file which contains strings, one per line in the file 12-30-2020

CSIS 153 Fall 2016 Python Program 7 Write a program that processes a text file which contains strings, one per line in the file 12-30-2020 313 HellO! Bye235 11 Cdc What? Not now! Tues abba HILLS 02-29-2019 78087 444-22-888 9878 7

NOTES: Your program should ask the user for the name of the text file. Be SURE to import os.path and use the isfile to ensure that the file exists. Also, make sure to close the file!Create the following functions be sure to include a description and statements about expectations for the number and type of each argument AND information about any information that is returned.

oisValidDate takes one string as a parameter, returns True if the string is a valid date. Otherwise, returns False.

oisPalindrome takes one string as a parameter, returns True if the string is a palindrome (a string that read the same forward as backward). Otherwise, it returns False

o hasAtLeastTwoUppercase takes one string as a parameter; returns True if the string contains at LEAST TWO uppercase letters. Otherwise, it returns False.

ohasAtLeastTwoOddDigits takes one string as a parameter; returns True if the string contains at LEAST TWO odd digits. Otherwise, it returns False.

oendsWithS takes one string as a parameter; returns True if the string ends with an s or an S. Otherwise, returns False.For each string in the file:

countVowels and in the output, print a list of all words with 2 or more vowels (case doesnt matter)

oDetermine if the string is a valid date, a palindrome, has at least TWO uppercase letters, has at least TWO odd digits, and/or ends with either an s or an S. oKeep a list of all of the valid dates, a list of all of the strings that contain at least TWO uppercase letters, a list of all strings that are palindromes, a list of all strings that contain at least TWO odd digits, a list of all strings that end with either an s or an S.Print the lists, and be SURE to LABEL your output! For example for the sample text file shown above: 504 111-22-3333 313 HellO by2e 11 cdc 232 toys abba HILLS 1111-22-3333 78087 111-22-111 9878 8

Valid dates: [ 12-30-2020

]Palindromes: [ 313, 11, cdc, 232, abba, 78087, 7 ]At least TWO Uppercase:

[ HellO!, HILLS ]

At least TWO odd digits:[ 12-30-2020, 313, Bye235, 11, 02-29-2019, 78087,9878]

Ends with s or S:[ What? Not now! Tues, HILLS ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!