-
-
Save bbookman/949b8fd32f432d4ee7feb1010fa82e47 to your computer and use it in GitHub Desktop.
''' | |
Find all of the numbers from 1-1000 that are divisible by 7 | |
''' | |
div7 = [n for n in range(1,1000) if n % 7 == 0] | |
print(div7) |
res=[y for y in range(1,1000) if y%7==0]
solution = [a for a in range(1,1000+1) if a % 7 == 0]
res = [n for n in range(1,1001) if n % 7 ==0)
div_by_7 = [num for num inn range(1001) if num % 7 == 0]
print(div_by_7)
list= [i for i in range(1,1001) if i%7==0]
list1 = [x for x in range(1001) if x%7==0]
print(list1)
num = print([n for n in range(1,1001) if n%7==0])
output = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, 448, 455, 462, 469, 476, 483, 490, 497, 504, 511, 518, 525, 532, 539, 546, 553, 560, 567, 574, 581, 588, 595, 602, 609, 616, 623, 630, 637, 644, 651, 658, 665, 672, 679, 686, 693, 700, 707, 714, 721, 728, 735, 742, 749, 756, 763, 770, 777, 784, 791, 798, 805, 812, 819, 826, 833, 840, 847, 854, 861, 868, 875, 882, 889, 896, 903, 910, 917, 924, 931, 938, 945, 952, 959, 966, 973, 980, 987, 994]
sol = [ n for n in range(1,1001) if n%7 == 0 ]