Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python isValidDate takes one string as a parameter, returns True if the string is a valid date. Otherwise, returns False. isPalindrome takes one string as
- Python
- 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.
- For each string in the file:
- Determine 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.
- Keep 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started