【发布时间】:2014-02-28 20:07:57
【问题描述】:
我正在制作一个程序来告诉你日期是星期几。 这是我到目前为止所得到的,但我不知道如何继续。
print('Welcome to the Daygram, the program that tells you the day on any date.')
print('Enter the date in the following format: DD MM YYYY')
date_input = input(What is the date? (DD MM YYYY)')
date_array = date_input.split(' ')
date = date_array[0]
month = date_array[1]
year = date_array[2]
如果有人可以帮助我,我可以弄清楚我接下来需要做什么。
【问题讨论】:
-
请编辑您的问题的标题。
-
首先,你写的代码会抛出一个 SyntaxError。在寻求更多帮助之前解决这个问题;)
-
问题应该是具体的:你坚持什么?
-
在修复缺失的引号后,接下来您应该了解列表和数组之间的区别。
-
另外,Python 2 和 Python 3 有很大的不同,所以如果你不确定版本是否重要,你应该指定版本。