Question: [EC1-6] ( boolexpr.py ) Write program that defines a boolean function isWithin(m,d,y) , returning True if the date m/d/y falls between the two dates 7/27/1995

[EC1-6] (boolexpr.py) Write program that defines a boolean function isWithin(m,d,y), returning True if the date m/d/y falls between the two dates 7/27/1995 and 7/27/2016, inclusive. Return False otherwise. You can assume that the entered date is valid. Your program should have a main() method that reads three int values month,day,year, then prints out the value of the call to isWithin(month,day,year).

But to earn extra credit, you must write your function WITHOUT using ANY if-elif-else NOR if-else statements, NOR ANY external modules! Do this by writing and returning the value of a single Boolean (bool) expression that is True exactly when the date month/day/year (each variable holding a valid int) satisfies the above requirements. Your function can ONLY use the Boolean and, or, not operators and the comparison operators >, >=, <, <=, ==, !=, plus any needed parentheses.

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!