How to add increasing cummulative value in existing decrement loops [on hold]


How to add increasing cummulative value in existing decrement loops [on hold]



How would i add increasing cummulative value (Wxj) in my existing loop codes


Wx = W/noOfStorey
SumWxHx = W*noOfStorey
storey = 30
while (storey >= 0):
Fx = (( V - Ft ) * Wx * storey )/ SumWxHx
SumHx = storey * 3
wh = SumHx *Wx
vdf = wh / SumWxHx
print("Storey (" + str(storey) + ") / " + str(SumHx) + " / " + str(Wx) + " / Fx = " + str(Fx) + " KN / " + str(wh) + " / " + str(round(vdf,2)))
storey = storey - 1



these are results of my existing codes:



enter image description here



Planning add other table beside Wx, Wxj (decrementing or cummulative)



the result should be when i insert another column:
Added column
Storey (30) / 90 / 8904.0 / 8904 / Fx ....
Storey (29) / 87 / 8904.0 / 817808 / Fx ....
Storey (28) / 84 / 8904.0 / 826712 / Fx ...



and so on



Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





Perhaps I am looking at this too simplistically. If storey = storey - 1 is to be part of the loop. then it needs to be indented by two spaces, just as the other loop code is indented.
– lit
Jun 30 at 14:09


storey = storey - 1





@lit my bad it’s indented. Will edit it
– Albert Pamonag
Jun 30 at 14:11





Do not post an image of what clearly is plain text output. (Unless the output is supposed to be an image. Your code does not look like that's the intention.)
– usr2564301
Jun 30 at 14:11






What's the question here, and what's the logic you're looking for?
– blhsing
Jun 30 at 14:13





Sorry rephrasing my questions
– Albert Pamonag
Jun 30 at 14:14




Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

Decreasing a static image progress bar horizontally in SDL

C++ thread error: no type named ‘type’ MINGW