+ 4
Code coach Day of the week
I wrote this code but it works for all test cases but one (test case #5) and I don't know why. Can you help me? Here is the problem: You receive a date and need to know what day of the week it is. Task: Create a program that takes in a string containing a date, and outputs the day of the week. Input Format: A string containing a date in either "MM/DD/YYYY" format or "Month Day, Year" format. Output Format: A string containing the day of the week from the provided date. Sample Input: 11/19/2019 Sample Output: Tuesday Here is the code I wrote: https://code.sololearn.com/cnzcUzQW582i
5 Antworten
+ 4
It works but only for some of the test cases. Some of them are with the following format:
July 20, 2020
But thank you very much. It help me to imrpve my knowledge.
+ 4
Thank you very much for your help!