Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this version of the assignment, you enter each part of each date one at a time - month, day, and then year. It is
In this version of the assignment, you enter each part of each date one at a time - month, day, and then year. It is possible to take in multiple strings in one line of input by using the split() function. Copy your original code into a new file and modify it to take in each date on one line using the split() function, as shown below in the sample runs. But be warned - you can only take in strings this way - you will need to convert your strings to ints to do proper comparisons. Run #1 Enter the birthday of Person A [MM/DD/YYYY]: 08/23/1994 Enter the birthday of Person B [MM/DD/YYYY]: 09/13/1994 Person A is older! Run #2 Enter the birthday of Person A [MM/DD/YYYY]: 07/15/1996 Enter the birthday of Person B [MM/DD/YYYY]: 07/10/1996 Person B is older! Run #3 Enter the birthday of Person A [MM/DD/YYYY]: 09/18/1995 Enter the birthday of Person B [MM/DD/YYYY]: 09/18/1995 Person A and Person B have the same age! Run #4 Enter the birthday of Person A [MM/DD/YYYY]: 99/12/1356 Enter the birthday of Person B [MM/DD/YYYY]: 12/67/1495 You entered an invalid date. Try again
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