Mar-11-2018, 05:18 PM
This may look like a repeated question, but oh my gosh, its confusing for me, that is why i am posting in homework although it is not homework. i have 3 lists
Names=["Jack","Jeni","Monsa","Mehus","Kuis","Tim","Tony","Yestgf","Pere"]
Years=[17,20,26,40,67,88,96,99,37]
Order=[1,2,3,4,5,6,7,8,9]
i want them to be manipulated to get the following things
i have a number and i want that number to be divided by length of order and the result will be the first range of n ranges and i want them to be further divided by the sum of years to get each share and then multiply that share according to the years, on top of all these i want the names to be printed using enumerate which i got as follows
Names=["Jack","Jeni","Monsa","Mehus","Kuis","Tim","Tony","Yestgf","Pere"]
Years=[17,20,26,40,67,88,96,99,37]
Order=[1,2,3,4,5,6,7,8,9]
i want them to be manipulated to get the following things
i have a number and i want that number to be divided by length of order and the result will be the first range of n ranges and i want them to be further divided by the sum of years to get each share and then multiply that share according to the years, on top of all these i want the names to be printed using enumerate which i got as follows
Names=["Jack","Jeni","Monsa","Mehus","Kuis","Tim","Tony","Yestgf","Pere"] Years=[17,20,26,40,67,88,96,99,37] Order=[1,2,3,4,5,6,7,8,9] for idx,name in enumerate(Names): for idx in range(idx,idx+len(Names)): for idy in range(idx,idx+len(Names)): for idz in range(idy,idy+len(Names)): for ida in range(idz, idz + len(Names)): print(name,Names[idx%len(Names)],Names[idy%len(Names)],Names[idz%len(Names)],Names[ida%len(Names)])