I am trying to print every value between 100 and 999 whose integers add up to equal 7 using a for
or while
loop in Python
Here is what I have so far, but once I have the three digits I don't know what to do.
three_digit = range(100,999,1)
dig1 = three_digit/10
dig2 = dig1/10
dig3 = dig1%10
lucky7 = (dig1+dig2+dig3)
print '' ,lucky7,