Hi guys,
struggling to learn. Why is there a syntax error in the following:
Thanks and very much appreciated
struggling to learn. Why is there a syntax error in the following:
Quote:combinations_amounts = []TEACH ME!!! By the way, I can't figure out how to show the indentations I have made in this post so I made these clumsy [ind], I hope you understand. I believe the indentation is correct, but who knows. maybe you?
for amount_100 in range (0, 100+1, 100):
[ind] for amount_50 in range (0, 100+1, 50):
[ind][ind] for amount_25 in range (0, 100+1, 25):
[ind][ind][ind] for amount_10 in range (0, 100+1, 10):
[ind][ind][ind][ind]for amount_5 in range (0, 100+1, 5):
[ind][ind][ind][ind][ind]for amount_1 in range (0, 100+1, 1):
[ind][ind][ind][ind][ind]total_so_far = amount_100 + amount_50 + amount_25 + amount_10 + amount_5 + amount_1
[ind][ind][ind][ind][ind]if total_so_far <= 100:
[ind][ind][ind][ind][ind][ind] combinations_amounts.append([amount_100, amount_50, amount_25, amount_10, amount_5 amount_1, 100 - total_so_far])
Thanks and very much appreciated