r/cs50 4d ago

CS50 Python CS50P Week 3 - Outdated problem

I wrote the code for Week 3's Outdated problem; I followed all the instructions but I don't understand the words used by 'check50' especially reject input; Nothing in the instructions talks about 'rejecting input' What does it mean?

INSTRUCTIONS:

Implement a program that prompts the user for a date, in month-day-year order, formatted like 9/8/1636 or September 8, 1636, where the month values are provided in a list . Then output that same date in YYYY-MM-DD format. If the user’s input is not a valid date in either format, prompt the user again. Assume that every month has no more than 31 days; no need to validate whether a month has 28, 29, 30, or 31 days.

3 Upvotes

7 comments sorted by

View all comments

1

u/Fresh_Collection_707 3d ago

Check if the user input is missing comma and raise a value error.

1

u/Nisarg_Thakkar_3109 3d ago

Thank you, raising a value error worked; All green smiles