Deon
Lt. of Mordor
Hello, I started to learn python just yesterday (using python.org), wrote a few programs with lists and dictionaries (now I know how to make and edit a database
LoL) and stumbled upon a problem...
First time i saw
I was really disappointed. Then I've found through google that this is the usual "float"-type rounding error caused by different bases and precisions.
So I have a question, what if I really need 39.95 in some cases (like float('39.95') )? How to tell the python the required base(10) and precision and what is the best way to deal with this problem in general?
[Offtopic] Also I'm a bit lost so I'd appreciate some help from a Guru, at least a finger at some useful tutorial for the CivIV. Because now when I started opening all those files in others' mods to see what can be done, the most complicated thing appears to be in fact the number of different functions, lists, dictionaries and variables the game already uses (like pPlayer, pPlot and others). Some of them are very clear by name, but some are just Alien Artifacts...

First time i saw
Code:
>>> print [39.95]
[39.950000000000003]
So I have a question, what if I really need 39.95 in some cases (like float('39.95') )? How to tell the python the required base(10) and precision and what is the best way to deal with this problem in general?
[Offtopic] Also I'm a bit lost so I'd appreciate some help from a Guru, at least a finger at some useful tutorial for the CivIV. Because now when I started opening all those files in others' mods to see what can be done, the most complicated thing appears to be in fact the number of different functions, lists, dictionaries and variables the game already uses (like pPlayer, pPlot and others). Some of them are very clear by name, but some are just Alien Artifacts...