ac1 = input('1=Jab, 2=Punch, 3=Kick, or 4=Taunt?: ')
if ac1 = 1:
print('You jab at Apollo Creed. He dodges it.')
print('Apollo Creed continues to taunt.')
ac1 = input('1=Jab, 2=Punch, 3=Kick, or 4=Taunt?: ')
if ac1 == 1:
print('You jab at Apollo Creed. He dodges it.')
print('Apollo Creed continues to taunt.')
您使用的是一个等号,它用于设置变量。在
使用double equals
==
检查变量是否等于某个值。在一个
=
符号是赋值。相等是双=
:相关问题 更多 >
编程相关推荐