I'v been studying Python for less than a month and am currently working on Project Euler.
So ironically I'm stuck on the first question. Check out my app road below and I would love some input as to where I have messed up. Or using the wrong logic.
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
My Logic/Code Flow
sum = multiple_three + multiple_five
multiple_three = []
multiple_five = []
def multiple_three(bignumber):
for number in range(bignumber):
if number % 3 == 0:
multiple_three.append(number)
def multiple_five(bignumber):
for number in range(bignumber):
if number % 5 == 0:
multiple_five.append(number)
bignumber = 1000
multiple_five(bignumber)
multiple_three(bignumber)
print multiple_three
print multiple_five