if(core_count % 2) == 0:
txt.write("n")
C_x = C_x + 200
T_x = T_x + 200
这是我目前得到的内容我想要一个for循环让c_x从0开始然后每次迭代加200
使用for
循环:
max_val = 2000
for C_x in range(0, max_val + 1, 200):
print(C_x)
使用while
环:
max_val = 2000
C_x = 0
while C_x <= max_val:
print(C_x)
C_x += 200
输出:0
200
400
600
800
1000
1200
1400
1600
1800
2000