我试着运行了你这段代码,没有问题。我想你是不是在命令行那里输错了,我们是在cmd中运行,不是在python的环境中运行。以下是我运行的cmd命令:C:\my_python_programs> python Test_01.py
如下是我测试代码:
# -*- coding:UTF-8 -*-
# FileName: Test_01.py
def c_a_c(a,b):
print "you have %d cheeses" % a
print "you have %d boxes of crackers" % b
print "Man,that's enough for party !"
print 'we can give the function numbers directly: '
c_a_c(20,30)