if(core_count % 2) == 0:
txt.write("\n")
C_x = C_x + 200
T_x = T_x + 200
this is what I have so far and I want a for-loop that starts c_x at zero and then adds 200 each iteraration
if(core_count % 2) == 0:
txt.write("\n")
C_x = C_x + 200
T_x = T_x + 200
this is what I have so far and I want a for-loop that starts c_x at zero and then adds 200 each iteraration
Using a for loop:
max_val = 2000
for C_x in range(0, max_val + 1, 200):
print(C_x)
Using a while loop:
max_val = 2000
C_x = 0
while C_x <= max_val:
print(C_x)
C_x += 200
Output:
0
200
400
600
800
1000
1200
1400
1600
1800
2000