Posts by Kaique • 3 points
2 posts
-
-1
votes1
answer26
viewsQ: I need to know how to achieve inheritance in my python program
from random import randint class PersonagemP: def __init__(self, nome): self.nome = nome self.posicao = str('DEF') self.pontosATK = int(randint(5, 20)) self.pontosDEF = int(randint(5, 20))…
-
-2
votes1
answer54
viewsQ: Trying to access a value inside a dictionary in Python, but I get an error when printing run the code
I was creating a dictionary playing with python Pokemon in pycharm Comunity, but when I went to perform the dictionary access, I was returned an error message in the code when trying to print one of…