Python Forum
Total electric construction cost project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Total electric construction cost project
#1
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!!!!!

#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
Python Version: 3.9.5
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.
Reply


Messages In This Thread
Total electric construction cost project - by SecondSandwich94 - Jul-20-2021, 10:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculate and print the total cost isha_dx 7 11,688 Feb-10-2021, 04:56 PM
Last Post: nilamo
  Electric Car battery size updating ???? ridgerunnersjw 1 1,818 Sep-06-2019, 02:03 AM
Last Post: metulburr
  Reproducing assignment with min cost flow in networkx mntfr 0 2,142 Jun-13-2019, 04:06 PM
Last Post: mntfr
  Writing device driver to stop electric supply to any I/O port sumandas89 0 1,812 May-02-2019, 10:22 AM
Last Post: sumandas89
  I'm blocked in the construction of my program [Novice] abcd 1 2,646 May-22-2018, 06:02 AM
Last Post: buran
  Class construction in python Alberto 3 4,421 Jul-18-2017, 03:37 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020