擅长:python、mysql、java
<p>基于您的错误,您似乎正在使用python2。所以需要使用<code>raw_input</code>返回字符串。而是<code>input</code>。你还需要用<code>upper</code>来代替<code>Upper</code>看起来<code>score</code>和<code>quit</code>在这里是多余的!你知道吗</p>
<pre><code>score = 0
print("This is a quiz on Internet safety!")
print("Question 1")
print("What is a firewall?")
print("A-A killer hot wall!")
print("B-A protection from virus'")
print("C-A protection from bad websites!")
answer1 = raw_input("make a decision").upper()
if answer1 == "C":
print("Good!")
score = score+1
else:
print("You failed....")
quit
</code></pre>