11 hours ago, MightyHoot said:
now tell me how to convert .py to single .exe file with py3.6 XD
downgrade to 3.5 and use on of pyinstaller, cx_Freeze or py2exe; I would either go for pyinstaller (looks mature) or py2exe (the oldest, used it for many projects)
there is no real reason a 3.6 code wont run under 3.5 imho
there is also no reason to use the latest python except you lack libraries or very specific functions otherwise. u know, in production, most still use py2.7 
btw. you wanna watch this - also, the dev version of pyinstaller seems to already support 3.6
15 hours ago, MightyHoot said:
just make put that in some int(thingie) so it’s nice 226
in python your math library rules, because round(x, 2) will round to two decimal places…
in javascript, things are, as always, a bit more complicated, because the language was written between the kitchen and the toilet.
(I like this:)
Quote
function round(x, digits){
return parseFloat(x.toFixed(digits))
}
anyway, as john uses toFixed already, and its only for outputting strings into html, i think toFixed() call to whatever is sufficient for him ”) just felt like this is a nice discussion.
@float
Otherwise, with floats, it helps to remember, resolution. float has a finite set of bits, depending on where the decimal is, this limits the total amount of significant digits / information stored, before and after the decimal. Btw. it’s called float because of this, the “decimal floats” between the digits dynamically. this means, that some numbers cannot be sufficiently displayed. numbers in front of the decimal take away more and more resolution, while infinitely small numbers may be cut off if combined with larger ones, if their significant parts are behind a lot of zeroes (1.2784blah E-9 ). it is not the only reason, but it plays into results, which are calculated over multiple steps, with different scales of numbers, you basicly cut off information. This gets more interesting in simulation, where this effect creates camera shakes in 3d sims if your coordinates you work with are at a certain distance from (0,0,0), reducing the resolution behind the decimal, and the main reason, most games using floats for x, y, z have a maximum mapsize of 99-999 units (whatever a unit may be, e.g. SC seems to be around 1f = 10m). There are other reasons, but this is one of the main issues for float, as the same problem almost never appears for doubles (64 bit), except you go into crazy number calcs.
I only tell you this, since you will have to study floats if you reach 3d coding. With your current learning speed, that might happen soon! 
life hack: if you ever see this happening at input (so if you input 127, and suddenly it says 127.0000001 in any kind of application) you know automatically, whatever you input, gets calculated in the background, or transformed into another number and retransformed for display, because this effect _always_ happens after calculations. this means, it is sufficient to round the value you display at output, rounding inbetween will achieve nothing, and a float will not suddenly change into something else, if you explicitly define it. Only saying, because before i understood floats, and to be honest it took me quite a few attempts, i was never sure wtf. Especially at applications, which let you input degrees (0°-360°) but stored the value in radians, so your inputted number suddenly gets fuzzy.
22 hours ago, John161 said:
I made Yet another Star Conflict Player Stats Viewer.
i looked at it, quite cool and short, kudos for releasing with source.
well okay, with js, thats hardly a question, but you know what i mean, with link to repo ”)