我正在开发一款假装载屏幕的游戏。我试图做一个渐进的elipsys,每秒增加一个时期,直到有3个时期。这是我输入的代码:
def intro2():
print('Loading CapsuleCorp computer'=end)
time.sleep(1)
print ('.'=end)
time.sleep(1)
print ('.')
time.sleep(3)
print ('Welcome to the CapsuleCorp main computer.')
time.sleep(1)
print ('Due to new security issues, we have added a new security system.')
print ('If you are an employee, we teach you these maditoraly.')
time.sleep(1)
print ('we wipe your mind as an ex-enployee')
然后,在运行后,我收到此错误:
keyword can't be an expression
并强调了这一点:
print**(**'Loading CapsuleCorp computer'=end)
答案 0 :(得分:0)
这将解决它:
print('Loading CapsuleCorp computer=', end)
根据您下面的其他评论,您可能正在寻找:
print('Loading CapsuleCorp computer', end='')