My Very First Python Program [U]
Posted by le717 , in Triangular Minifigure Blog 05 January 2013 · 207 views
THIS PROGRAM WAS WRITTEN BY A BEGINNER PROGRAMMER. YOU WILL FIND IT TO BE VERY BASIC, AND NOT VERY USEFUL TO YOU. YOU HAVE BEEN WARNED.
It's more of a test program than a useful program, but it is my nevertheless my first program.
I call it Basic Shapes. It calculates the Perimeter and Area of a Triangle, Circle, Rectangle, and Square. Some of the shapes have other calculations attached to them. I also have an Easter egg thrown in (Hint: a 2x4 ____ brick).
I wrote it in Python 3.3 using IDLE (IDLE is horrible), and compiled x86 and x64 Windows EXEs using cx_freeze (why, since this is just a test, who knows). The Python script has no dependencies other than a Python interpreter. I did run it on Python 2.7, but it did not work (which is odd, since it is such a simple script). The EXEs also have no dependencies other than the files in the same folder as the EXE.
As of V1.1, all bugs have been fixed, and now works as I had originally planned.
Download Basic Shapes V1.1 from Sourceforge.net.
Special thanks to JrMasterModelBuilder for helping me set up the multiple Python installations correctly, for looking at my code because I thought it was broken, and just putting up with me and all my annoying questions!
Update: I've basically rewritten the script, fixed it up a bit and correcting the bugs. If you care, get the updated version from the link above.