<pre><code>pin1 = int(input("Please set a pin: "))
print("Welcome to Satan's Soul Bank, Enter ya pin!")
attempt = int(input("Please enter your pin number first"))
if attempt == pin1:
print("Select operation.")
print("1.Deposit Souls")
print("2.Withdraw Souls")
print("3.Check Soul balance")
choice = int(input("Enter choice(1/2/3):"))
elif attempt != pin1:
for i in range(2):
attempt = int(input("Invalid Attempt Please enter your pin
number again"))
else:
print ("Card Swallowed Contact SATAN")
</code></pre>
<p>代码本身与else后面的print语句不同:它似乎无法识别它,只是错过了它,基本上,我需要它来打印,卡已吞咽后3次,但当我把它放入elif区,它只是打印它,每次我得到的引脚错误,所以有没有其他方法来绕过,导致打印卡已吞咽后3次</p>