From 1161f9a034de06a63538e3a9a0b7717098c744d9 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 7 Apr 2023 08:13:49 -0500 Subject: Initial Commit --- Problem5.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Problem5.py (limited to 'Problem5.py') 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 + + -- cgit v1.2.3