diff options
author | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
---|---|---|
committer | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
commit | 1161f9a034de06a63538e3a9a0b7717098c744d9 (patch) | |
tree | 55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem5.py |
Diffstat (limited to 'Problem5.py')
-rw-r--r-- | Problem5.py | 18 |
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 + + |