1
내가 파이썬 프로그램을 작성하고이 없으며이 오류 얻을 :속성 오류 : 'INT'개체가 어떤 속성 '선택'
: 여기Traceback (most recent call last):
File "C:\Users\Joe\SkyDrive\Documents\Python Project\Python\Forest path.py", line 28, in <module>
random = random.choice(accuracy)
AttributeError: 'int' object has no attribute 'choice'
코드의 비트가 참조됩니다됩니다
while health_1 > 0 and health > 0 and stamina > 0:
random = random.choice(accuracy)
if random != "0":
print("\n\n", random)
print("\nYou manage to hit the creature for", dmg, "damage!")
health_1 -= dmg
stamina -= stam_loss
print("The creature now has", health_1, "health")
print("\nThe creature hits you for 1 damage!")
health -= 1
print("Health:", health, "Stamina:", stamina,)
랜덤 모듈을 한 번 실행 한 다음 오류를 생성합니다. 도움을 주시면 감사하겠습니다.