summaryrefslogtreecommitdiff
path: root/Problem5.py
diff options
context:
space:
mode:
Diffstat (limited to 'Problem5.py')
-rw-r--r--Problem5.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Problem5.py b/Problem5.py
new file mode 100644
index 0000000..81b063c
--- /dev/null
+++ b/Problem5.py
@@ -0,0 +1,18 @@
+def isdivisible(n):
+ divisors = [19,18,17,16,15,14,13,11]
+ for x in range(0,8): #Checks if value is divisible by numbers 2-20 (1 is not necessary to check)
+ if n % divisors[x] != 0:
+ return False
+ return True
+valuefound = False
+counter = 20
+while valuefound == False:
+ if isdivisible(counter) == True:
+ valuefound == True
+ print("**Result**:",counter)
+ break
+ else:
+ print(counter)
+ counter+=20 #increment by the largest required multiple
+
+