Skip to content
Advertisement

Tag: python-3.x

How to convert Julian date to standard date?

I have a string as Julian date like “16152” meaning 152’nd day of 2016 or “15234” meaning 234’th day of 2015. How can I convert these Julian dates to format like 20/05/2016 using Python 3 standard library? I can get the year 2016 like this: date = 20 + julian[0:1], where julian is the string containing the Julian date, but

Python Convert any number to power of 10 (E-notation)

In my program big numbers is shown off and for this reason I want any number to be converted to power of 10 (E-notation). I tried an idea that came to my mind but I get an error that says: How I succeed that I want? Answer In Python floats are usually double-precision IEEE-754 floating point numbers; it has 11

How to set a tkinter window to a constant size

I’m programming a little game with tkinter and briefly, I’m stuck. I have a kind od starting menu, in which are two buttons and one label. If I just create the frame everything is fine, it has the size 500×500 pixels I want the background not to change when I create the buttons and the labe, but it adapts the

Advertisement