试图打印简单的文本程序,但将n

2024-04-26 11:05:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我只是想打开一个.py,在黑色的控制台上打印这个报价单。在C++中,输入()是否与^ {CD1}}相同?你知道吗

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

Tags: pynoneifthatislinenotit
1条回答
网友
1楼 · 发布于 2024-04-26 11:05:19

input()应该可以工作,所以它可能是复制粘贴时出现错误的断开引号字符。尝试将这些更改为",或者更好地使用带有"""triple quotes"""的多行字符串。你知道吗

相关问题 更多 >