Oct-11-2019, 02:39 AM
I am trying to code a list of 10 items whose values come from the equation y=a*(b-x) and complete the rest of it with 0. e.g:
a=1 b=5 list=[] x=0 while (x<=b): x=x+1 y=a*(b-x) break list.append(y) list=[1,2,3,4,5,6,0,0,0,0,0]