擅长:python、mysql、java
<p>您使用显式语句分隔符和行延续创建了一个大的oneliner。它很难看,而且很容易出错。我假设你在Python3号工作。在python2中,input()要求用户输入有效的python表达式。如果使用python2,请改用raw_input()。在</p>
<pre><code>import random
print("Welcome to the fortune cookie simulator")
print("\n\nThe fortune cookie minus the good part..")
input("\n\n\nPress enter to recieve your fortune!")
fortune = random.randint(1, 5)
if fortune == 1:
print("You will die today")
</code></pre>