¿Cómo funciona si las declaraciones funcionan?
Estoy haciendo un juego de ruleta rusa basado en texto en Python, pero aún no he terminado, como se puede ver simplemente mirando mi código:
#!/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
Por alguna razón, incluso si alguien ingresa1
dentrobulletcounter
, no activa laif
declaración:if bulletcounter == 1
. ¿Cómo hago que active laif
declaración?