15 lines
409 B
Python
15 lines
409 B
Python
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)) |