I have made a Game which is like and RPG stat creator. However as part of the assignment, you have to print the stat onto a *.txt file.
I have got this far by using this website:
http://www.afterhoursprogramming.com/tutorial/Python/Writing-to-Files/
And the Code is:
f = open("test.txt","a") #opens file with name of "test.txt"
f.write("The Name of the Character is" ,name,)
[Leave Line]
[Leave Line]
f.write("Class")
[Leave Line]
f.write("Strength /100:" ,strength,)
[Leave Line]
f.write("Magic /100:" ,magic,)
[Leave Line]
f.write("Dexterity /100: ,dexterity, ")
[Leave Line]
f.write("Extra Ability is...." ,extraability,)
f.close()
But I don't know how to leave a line after each statistic. The end result should look like this:
The ,'something', are just variables I have made.
Help would be greatly appreciated!