你能告诉我我的Python脚本有什么问题吗?(2.7.14)

时间:2018-02-13 21:50:47

标签: python python-2.7

当我输入30时,它说它不正确,我做错了什么?

from datetime import datetime
now = datetime.now()
print '%s/%s/%s %s:%s:%s' % (now.year, now.month, now.day, now.hour, now.minute, now.second)
print raw_input('Welcome, first you need to confirm you can do math. Press ENTER to continue.')
answer = raw_input("What is 9 + 21?:")

if answer == 30:
    print 'Access granted.'
else:
    print 'Incorrect.'

0 个答案:

没有答案