diff --git a/solutions/005/smallestmultiple.py b/solutions/005/smallestmultiple.py new file mode 100644 index 0000000..9d308df --- /dev/null +++ b/solutions/005/smallestmultiple.py @@ -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)) \ No newline at end of file