擅长:python、mysql、java
<p>下面是对代码的改进</p>
<pre><code>secret = "Meow"
guess = ""
limit = 1
while guess != secret and limit <= 5:
if limit == 1:
guess = input("What's the secret? OwO You have 5 guesses. ")
elif limit >= 2: #here was your mistake
print("You have {0} guess left!".format(5-limit+1))
guess = input("What's the secret? OwO. ")
limit += 1
print("You cheated! Or lost.")
</code></pre>