尝试打印简单的文本程序但不起作用

时间:2012-09-17 02:47:34

标签: python python-3.x

我只是想打开一个.py并在黑色控制台上打印此报价。 input()与C ++中的system("PAUSE")相同吗?

print(“Quote: If people do not believe that mathematics is simple, it's")
print("       only because they do not realize how complicated life is.”)
print("By: John von Neumann")
input()

谢谢,我真的想让它发挥作用!

这是输出:

Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
[evaluate untitled-1.py]
Traceback (most recent call last):
  File "None", line 4, in <module>
Syntax Error: print (“Quote: If people do not believe that mathematics is simple, it's): None, line 415

1 个答案:

答案 0 :(得分:2)

input()应该有效,因此它可能是复制和粘贴中的错误引号字符,它会给您一个错误。尝试将这些更改为",或者更好地使用带有"""triple quotes"""的多行字符串。