我正在尝试将一个小型Java项目重写为Python,这给了我一个语法错误,我不知道该如何解决。
我认为我已经正确地执行了缩进操作,而棉短绒似乎正在完成其任务,但是它并没有为我提供有关该错误或如何解决该错误的更多详细信息。代码不完整,因此我希望它会出现错误,但是我无法以这种方式测试代码的不同部分。
谢谢。
while True:
response1 = input()
if response1 == inputCheck:
print("The Drake drags a smile across his many sharp teeth.")
print(initiativeDrake)
print("You flash a smirk in return")
print(initiativeUser)
if initiativeUser > initiativeDrake:
counter + 1
while True:
#It marks the error on this line here vvv (invalid syntax (<unknown>, line 46))
if counter = 1:
print("playerFirst")
elif counter = 0:
print("drakeFirst")
else:
print("Error 400: Malformed/Illegal request. Please exit program and restart.")
sys.exit()
else:
print("Your input was invalid, please try again.")
pass