Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSIS 153 Fall 2016 Program 7 20 pts using python program 3.py A program that processes a text file which contains strings, one per line

CSIS 153 Fall 2016 Program 7 20 pts using python program 3.py

A program that processes a text file which contains strings, one per line in the file.

313,

HellO!,

Bye235,

11,

Cdc ,

What?

Not now! Tues ,

abba ,

HILLS,

02-29-2019,

78087 ,

444-22-888 ,

9878 ,

7

Your program should have to ask the user for a certain name for a text file and have to import it using os.path. You should also use the isfile and it must be able to close.

Create the following functions BE SURE to include DOCSTRINGS for EACH of these functions, with a DESCRIPTION and PRECONDITIONS for each of the parameters

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

> isPalindrome 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

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

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

>endsWithS takes one string as a parameter; returns True if the string ends with an s or an S. Otherwise, returns False.

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

Print the lists, and be

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions