Im making a D&D related program because i like doing character sheets by myself and im making it simpler but i've run into a problem
def calculateMod(x):
for n in range (0):
base= x -10
base2=base/2
nMod = math.floor(base2)
With the xMod variable i'm trying to take the Ability Score that they want to calculate the modifier for (if you don't understand exactly what i'm talking about its ok its not python related) however i've created the character into a class, so the strength for example is more of a variable less of a string, so if i want to calculate the modifier for strength i would put
calculateMod(character.strength)
so for xMod i would like it to be strengthMod so i can differentiate from my other modifiers. Is there any way to do this?