I was wondering whether I could write the information of the attributes of each character into a text file and how would I be able to do this? The attributes on the notepad file need to be updated every time someone plays the game.
def strength():
dice12 = random.randint(1,12)
dice04 = random.randint(1,4)
strfinalstats = dice12/dice04+10
print ">",strfinalstats,"strength"
def skill():
dice12 = random.randint(1,12)
dice04 = random.randint(1,4)
skfinalstats = dice12/dice04+10
print ">",skfinalstats,"skill!"
def player1():
name1=raw_input("what would you like to call the first player?")
print name1,"has:"
time.sleep(1)
strength()
time.sleep(1)
skill()
def player2():
name2=raw_input("what would you like to call the first player?")
print name2,"has:"
time.sleep(1)
strength()
time.sleep(1)
skill()
def player3():
name3=raw_input("what would you like to call the first player?")
print name3,"has:"
time.sleep(1)
strength()
time.sleep(1)
skill()