I am relatively new to coding in general and started Project Euler to bring my coding a bit further. Spent some time thinking of how to work the first question on my own and tri
I'd strongly advise against recursion, since it might work for small number but not for bigger ones, and even if the solution might work, it would teach you a wrong approach.
def euler_1(sum, range_beg, range_end):
for number in range( range_beg, range_end):
if (( number % 3 ) == 0) or ((number % 5) == 0):
sum += number
else:
pass
return sum
print(euler_1( 0, 0, 1000))
This is more pythonic, reusable, faster and simpler to read and correct.