CoCalc Public Files2 / 3 / 17.ipynbOpen with one click!
Author: Dylan Cortes
Views : 27
Compute Environment: Ubuntu 20.04 (Default)
In [1]:
[i for i in range(0,51) if i % 2 == 1] #it's range 51 because the list is 0 to 50. The i%2==1 means we are seeing if 2 can go into our range numbers and seeing if we can get a remainer of 1. If so it means its odd because the definition of odd is 2I+1.
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]
In [ ]: