这是我的一个简单函数的代码,因为我是初学者
def repeat(s, exclaim):
result = s*3
if exclaim:
result = result + '!!!'
return result
def main():
print repeat('Yay', False)
print repeat('Woo Hoo', True)
if __name__ == '__main__':
main()
但是当我运行这段代码时,它显示了一个错误
print repeat('Yay', False)
语法错误:无效语法
请帮忙
试试这个:
相关问题 更多 >
编程相关推荐