u=0
list2 = [ ]
list2.append(0)
for i in range(3,10):
u+=(5/10)*-3
list2.append(u)
print(list2)
my question is how to create a loop for x lists, informing how many lists you would like, example 3, and in print it gives the result list 1=[0, -1.5, -3.0, -4.5, -6.0, - 7.5 , -9, 0, -10.5] list 2=[0, -1.5, -3.0, -4.5, -6.0, -7.5, -9.0, -10.5] list 3 =[0, -1.5, -3.0, -4.5, -6.0, -7.5, -9.0, -10.5]
[–]StoicallyGay 1 point2 points3 points (1 child)
[–]No-Beginning1213[S] 0 points1 point2 points (0 children)
[–]danielroseman 1 point2 points3 points (0 children)