我正在用Python制作一个基于文本的俄罗斯轮盘游戏,但是从我的代码中可以看到,我远没有完成:
#!/usr/bin/env python
print("The maximum number of bullets is 3")
bulletcounter = input("How many bullets do you want your gun to have?")
print(bulletcounter, "bullets")
paname = input("Enter Player 1's Name: ")
pbname = input("Enter Player 2's Name: ")
print(paname.capitalize(), "Vs.", pbname.capitalize())
if bulletcounter == 1:
bulletcount = 0
print(bulletcount)
bulletaloc = random.randint(1, 6)
while bulletaloc != bulletcount:
bulletcount += 1
出于某些原因,即使有人在bulletcounter
中输入了1
,它也不会触发if bulletcounter == 1
语句。我该如何让它触发if
语句呢?
if
语句没有被执行? - paxdiablo