Dir structure
This commit is contained in:
parent
b8d3e78dbd
commit
78c7f917d1
BIN
lib/__pycache__/num_functions.cpython-310.pyc
Normal file
BIN
lib/__pycache__/num_functions.cpython-310.pyc
Normal file
Binary file not shown.
2
lib/num_functions.py
Normal file
2
lib/num_functions.py
Normal file
@ -0,0 +1,2 @@
|
||||
def isDivBy(num, denom):
|
||||
return num % denom == 0
|
@ -1,6 +0,0 @@
|
||||
sum = 0
|
||||
|
||||
for i in range(1, 1000):
|
||||
if i % 3 == 0 or i % 5 == 0: sum += i
|
||||
|
||||
print(sum)
|
10
src/problem1.py
Executable file
10
src/problem1.py
Executable file
@ -0,0 +1,10 @@
|
||||
import sys
|
||||
sys.path.append("lib")
|
||||
from num_functions import isDivBy
|
||||
|
||||
sum = 0
|
||||
|
||||
for i in range(1, 1000):
|
||||
if isDivBy(i, 3) or isDivBy(i, 5): sum += i
|
||||
|
||||
print(sum)
|
Loading…
Reference in New Issue
Block a user