擅长:python、mysql、java
<pre><code>command = raw_input(shayon)
</code></pre>
<p>变量<code>shayon</code>没有在这一行之前定义,因此程序会因<code>NameError</code>而崩溃。你知道吗</p>
<p>预先给<code>shayon</code>赋值,或者如果您希望实际的字母序列“shayon”作为输入提示出现在用户面前,请使用字符串文字。你知道吗</p>
<pre><code>shayon = "what is your favorite color?"
while (True):
command = raw_input(shayon)
if command == "abarjigay":
print ("Yahoo!")
</code></pre>
<p>或者</p>
<pre><code>while (True):
command = raw_input("shayon")
if command == "abarjigay":
print ("Yahoo!")
</code></pre>