<p>我在macos上使用IDLE for Python。我在一个.py文件中写了以下内容:</p>
<pre><code>import math
def main():
print "This program finds the real solution to a quadratic"
print
a, b, c = input("Please enter the coefficients (a, b, c): ")
discRoot = math.sqrt(b * b-4 * a * c)
root1 = (-b + discRoot) / (2 * a)
root2 = (-b - discRoot) / (2 * a)
print
print "The solutions are: ", root1, root2
main()
</code></pre>
<p>现在空闲将永久显示:</p>
<blockquote>
<p>This program finds the real solution to a quadratic</p>
<p>Please enter the coefficients (a, b, c): </p>
</blockquote>
<p>当我输入3个数字(例如:1,2,3)时,IDLE什么也不做。当我点击进入空闲崩溃(没有崩溃报告)。在</p>
<p>我退出并重新启动,但IDLE现在永久显示上述内容,不会响应其他文件。在</p>