Question: in python Prompt and read in two DateTime values and a string value from the user. The string value should contain some bracketed [ ]
Prompt and read in two DateTime values and a string value from the user. The string value should contain some bracketed [ ] text, at least one "A" character, and a mixture of upper and lower case letters. Validate the Date Time values entered by the user are valid; if not, display a message and end the program; if they are valid, continue. Calculate and output: . Whether the first date is before the second or not The absolute difference in minutes between the two dates (to 2 decimals positions, with thousands separators) (only for C#) if the first date falls in a leap year The user string, after converting it entirely to upper case, removing the substring between the first occurrence of and characters (including the brackets), and replacing each "\" character with "LSU". Test case #1: Enter datetimel: 3/1/21 Enter datetime2: 2/1/20 Enter string: Pandas [in the Snow] D2 before DI Difference in minutes: 567,360.00 Is Leap Year? False String: PANDAS LSU Test case #2: Enter datetimel: 2/1/20 9:15am Enter datetime2: 3/1/21 4:32pm Enter string: Pandas [funny) in the snow D1 before D2 Difference in minutes: 567,797.00 Is Leap Year? True String: PANDAS LSU IN THE SNOW Test case #3: Enter datetimel: 2/1/20 x Enter datetime2: 3/1/20 Enter string: Pandas [in the snow] Error in datetimes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
