Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

1. Let a, b R, a Answered: 1 week ago

Answered: 1 week ago

Question

Technology. Refer to Case

Answered: 1 week ago