Jul-20-2021, 10:09 PM
(This post was last modified: Jul-20-2021, 10:09 PM by SecondSandwich94.)
Hey guys! I've started learning Python on my own and am looking to start building real world projects in order to boost my understanding of how things tie together. I currently work at an electric coop where we provide electric service to residential and commercial customers. The first project I'm currently working on is a program that will contain a GUI where construction materials will be selected/input and a total price will be calculated.
I brainstormed ways on how to create a price sheet from which the individual components will be taken and a total price generated. Creating and importing a module with a function for each component of the construction project along with the price per unit made the most sense to me.
My train of though was that I should start with creating the price sheet as a module, then move on to creating a GUI that will selectivly use only the appropriate functions within the module, then creating some kind of an equation at the end and tying everything together to spit out a grand total. I'm very new to Python but extremely excited to learn! I need to know if I'm on the right track or if anybody has ideas on how to go about this a better more efficient way! Any help would be greatly appreciated!!!!
Below you'll find my incomplete module so you guys can see what I have so far. Thanks again!!!!!
Python Version: 3.9.5
I brainstormed ways on how to create a price sheet from which the individual components will be taken and a total price generated. Creating and importing a module with a function for each component of the construction project along with the price per unit made the most sense to me.
My train of though was that I should start with creating the price sheet as a module, then move on to creating a GUI that will selectivly use only the appropriate functions within the module, then creating some kind of an equation at the end and tying everything together to spit out a grand total. I'm very new to Python but extremely excited to learn! I need to know if I'm on the right track or if anybody has ideas on how to go about this a better more efficient way! Any help would be greatly appreciated!!!!
Below you'll find my incomplete module so you guys can see what I have so far. Thanks again!!!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
#thirty foot pole def thirtyftpole(treiftpl): return 30 * treiftpl #forty foot pole def fortyftpole(quarftpole): return 40 * quarftpole #fifty foot pole def fiftyftpole(cinqftpole): return 50 * cinqftpole #sidewalk guy wire assembly def ve12SWG(sg): return 35 * sg #overhead guy wire assembly def ve22(ohg): return 25 * ohg #security light assembly, add if new construction then no charge, system imp will result in charge def vm265(scl): return 60 * scl #made up code, LED security light def vm777(lscl): return 100 * lscl #made up code, wood cross arm def vc7w(wxa): return 250 * wxa #fiberglass cross arm def vc8fg(fgxa): return 400 * fgxa #arrestors def vm56(arts): return 4 * arts #cutout def vm50(cut): return 30 * cut #I210+ meter def vm8(srm): return 125 * srm #cogen meter, made up code def qm8(cgm): return 320 * cgm #overhead conductor - primary - in $/ft where ohcp = 1 foot def overheadcp(ohcp): return 1.5 * ohcp #overhead conductur - secondary def overheadcs(ohcs): return 1 * ohcs #underground conductor - primary def undergroundcp(urdcp): return 30 * urdcp #underground conductor - secondary - max 175ft, what happens after this? must be primary or gets more expensive??? def undergroundcs(urdcs): return 15 * urdcs #riser, only if urd srv def riser(riz): 45 * riz #10KVA xfmr def tenKVA(dzkva): 250 * dzkva #15KVA xfmr def fifteenKVA(qckva): return 350 * qckva #25KVA xfmr def twentyfiveKVA(twfkva): return 450 * twfkva |
Larz60+ write Jul-20-2021, 10:37 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please avoid images of code, rather use bbcode tags.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please avoid images of code, rather use bbcode tags.