Oct-08-2019, 02:48 AM
Hello everyone.
I am a new programmer.
I am trying to create a vector called "pressure", below is an example for the calculations that I have been trying to do.
Below is just a small piece from my code, which is the part that I am trying to solve. Also I simplified the "formula".
TypeError: 'int' object is not iterable
I am a new programmer.
I am trying to create a vector called "pressure", below is an example for the calculations that I have been trying to do.
Below is just a small piece from my code, which is the part that I am trying to solve. Also I simplified the "formula".
pressure = []
i = 1
p0 = 50
pcp0 = 20
n = 10
while i < n:
p1 = p0 - 0.17 * pcp0
for pressure in i:
pressure.append(p1)
i = i + 1
p0 = p1 The error is for pressure in i:TypeError: 'int' object is not iterable
