Nov-10-2016, 04:06 PM
Hi guys,
Below these lines done I have two programs that gives me two list. However, now, I have some problems which I cannot find anyplace which can give me hand to sort them out.
1. I would like to multiply the OPEX_evolution(26) outcome by a constant in order that each item of the list is multiply by that constant
e.g. 79241500 * 2 = 158483000
2. How can I transform the outcome OPEX_evolution(26) into a string:
e.g. from into: [79241500, 80826330,.......,124955863.04342265, 127454980.30429111]
79241500
80826330.0
82442856.6
84091713.732
85773548.00664
87489018.96677281
89238799.34610827
91023575.33303043
92844046.83969104
94700927.77648486
96594946.33201456
98526845.25865485
100497382.16382794
102507329.8071045
104557476.4032466
106648625.93131153
108781598.44993776
110957230.41893652
113176375.02731526
115439902.52786157
117748700.57841879
120103674.58998717
122505748.08178692
124955863.04342265
127454980.30429111
3. How can I select from the OPEX_evolution(26) one item (e.g. the third one: 82442856.6) and be multiply by one constant (e.g. x = 25)
and
4. Giving OPEX_evolution(26) and Grid_Price(26), how can I do to write them in such a way that, when running, I have got two columns and how can interact between them?
Cheers, I hope I can develop faster so that I can master this language. Sorry, it is my first approach to programming
# OPEX evolution for 25 years #PROGRAM TO OBTAIN OPEX FOR 25 YEARS
print('OPEX FOR 25 YEARS')
def OPEX_evolution®:
Total_initial = Total_OPEX
print(Total_initial)
Total_initial_h = Total_initial
for n in range(2, r):
Total_initial_h = Total_initial_h * (1 + Interest_Rate)
print(Total_initial_h)
OPEX_evolution(26)
# GRID PRICE #PROGRAM TO OBTAIN GRID PRICES
ROC = Offshore_ROC
print('ROC')
print(Offshore_ROC)
print('GRID PRICE')
def Grid_Price®:
Initial_Price = Baseline_price
Initial_Price_baseline = Baseline_price + ROC
print(Initial_Price_baseline)
Initial_price_h = Initial_Price
for n in range(2,21):
Initial_price_h = Initial_price_h * (1 + Interest_Rate)
Last_Price = Initial_price_h + ROC
print(Last_Price)
for n in range(21,r):
Initial_price_h = Initial_price_h * (1 + Interest_Rate)
print(Initial_price_h)
Grid_Price(26)
RUNNING IT GIVES:
OPEX FOR 25 YEARS #OPEX LIST
79241500
80826330.0
82442856.6
84091713.732
85773548.00664
87489018.96677281
89238799.34610827
91023575.33303043
92844046.83969104
94700927.77648486
96594946.33201456
98526845.25865485
100497382.16382794
102507329.8071045
104557476.4032466
106648625.93131153
108781598.44993776
110957230.41893652
113176375.02731526
115439902.52786157
117748700.57841879
120103674.58998717
122505748.08178692
124955863.04342265
127454980.30429111
GRID PRICE #GRID PRICES
118.495
119.535
120.5958
121.677816
122.78147232
123.90720176640001
125.05544580172801
126.22665471776256
127.42128781211781
128.63981356836018
129.8827098397274
131.15046403652192
132.44357331725234
133.7625447835974
135.10789567926935
136.48015359285475
137.87985666471184
139.30755379800607
140.7638048739662
142.24918097144553
77.26926459087443
78.81464988269192
80.39094288034576
81.99876173795268
83.63873697271173
Below these lines done I have two programs that gives me two list. However, now, I have some problems which I cannot find anyplace which can give me hand to sort them out.
1. I would like to multiply the OPEX_evolution(26) outcome by a constant in order that each item of the list is multiply by that constant
e.g. 79241500 * 2 = 158483000
2. How can I transform the outcome OPEX_evolution(26) into a string:
e.g. from into: [79241500, 80826330,.......,124955863.04342265, 127454980.30429111]
79241500
80826330.0
82442856.6
84091713.732
85773548.00664
87489018.96677281
89238799.34610827
91023575.33303043
92844046.83969104
94700927.77648486
96594946.33201456
98526845.25865485
100497382.16382794
102507329.8071045
104557476.4032466
106648625.93131153
108781598.44993776
110957230.41893652
113176375.02731526
115439902.52786157
117748700.57841879
120103674.58998717
122505748.08178692
124955863.04342265
127454980.30429111
3. How can I select from the OPEX_evolution(26) one item (e.g. the third one: 82442856.6) and be multiply by one constant (e.g. x = 25)
and
4. Giving OPEX_evolution(26) and Grid_Price(26), how can I do to write them in such a way that, when running, I have got two columns and how can interact between them?
Cheers, I hope I can develop faster so that I can master this language. Sorry, it is my first approach to programming
# OPEX evolution for 25 years #PROGRAM TO OBTAIN OPEX FOR 25 YEARS
print('OPEX FOR 25 YEARS')
def OPEX_evolution®:
Total_initial = Total_OPEX
print(Total_initial)
Total_initial_h = Total_initial
for n in range(2, r):
Total_initial_h = Total_initial_h * (1 + Interest_Rate)
print(Total_initial_h)
OPEX_evolution(26)
# GRID PRICE #PROGRAM TO OBTAIN GRID PRICES
ROC = Offshore_ROC
print('ROC')
print(Offshore_ROC)
print('GRID PRICE')
def Grid_Price®:
Initial_Price = Baseline_price
Initial_Price_baseline = Baseline_price + ROC
print(Initial_Price_baseline)
Initial_price_h = Initial_Price
for n in range(2,21):
Initial_price_h = Initial_price_h * (1 + Interest_Rate)
Last_Price = Initial_price_h + ROC
print(Last_Price)
for n in range(21,r):
Initial_price_h = Initial_price_h * (1 + Interest_Rate)
print(Initial_price_h)
Grid_Price(26)
RUNNING IT GIVES:
OPEX FOR 25 YEARS #OPEX LIST
79241500
80826330.0
82442856.6
84091713.732
85773548.00664
87489018.96677281
89238799.34610827
91023575.33303043
92844046.83969104
94700927.77648486
96594946.33201456
98526845.25865485
100497382.16382794
102507329.8071045
104557476.4032466
106648625.93131153
108781598.44993776
110957230.41893652
113176375.02731526
115439902.52786157
117748700.57841879
120103674.58998717
122505748.08178692
124955863.04342265
127454980.30429111
GRID PRICE #GRID PRICES
118.495
119.535
120.5958
121.677816
122.78147232
123.90720176640001
125.05544580172801
126.22665471776256
127.42128781211781
128.63981356836018
129.8827098397274
131.15046403652192
132.44357331725234
133.7625447835974
135.10789567926935
136.48015359285475
137.87985666471184
139.30755379800607
140.7638048739662
142.24918097144553
77.26926459087443
78.81464988269192
80.39094288034576
81.99876173795268
83.63873697271173