feat(solution): problem #5

main
steven 2023-07-31 12:45:06 -04:00
parent 617c6b777c
commit d110137e41
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
def evenlyDivisible(num):
for i in range(1, 21):
if num % i != 0:
return False
return True
multipleFound = False
multiple = 20
while multipleFound == False:
multipleFound = evenlyDivisible(multiple)
if multipleFound == False:
multiple += 1
print("The smallest positive number that is evenly divisible by all of the numbers from 1 to 20 is: " + str(multiple))