擅长:python、mysql、java
<p>除了错误的缩进之外,在条件语句中还需要用比较运算符替换赋值运算符。而且,<code>:</code>从<code>if statement</code>中丢失。你知道吗</p>
<pre><code>def register():
print("Register")
login = input("Enter login")
passwd = input("Enter password")
passwdacc = input("Accept password")
if passwdacc == passwd:
print("You have registered, now please sign up")
else:
print("Try again, passwords don't match")
login2 = input("Enter login")
password = input("Enter password")
if password == passwd and login2 == login:
print("Accepted")
else:
print("Try again")
</code></pre>