User:Eidnoxon213/sandbox

Python Modulus (A.K.A % sign). The % sign is finding the remainder of a given value. like: 5%2, 4%2. If you would print it, you would get 1, 0. because 5 divided by 2 is 2, and we have a remainder 1. and 4 divided by 2 is also 2, but the difference is that you don't have a remainder. Example, if you create an array, full of 0 to 10, and we want our computer to print out the even, then we can just: "even = [x for x in range(11) if x%2 == 0]". the "x for x in range(11)" will create an array full of numbers 0 to 10. if you don't know anything about the range function, check out this documentation. And the "if x%2 == 0" is going thru all the numbers in the array and dividing them by 2. And it's only gonna and the number to the list, if the number the program just divided, has no remainder. Example: 3 divided by 2 is 1, and has a remainder 1. So it'll not gonna add the number 3 to the list. but we have 4. The program divides the 4 with 2, and checks out the remainder. In that case, the remainder is equals to 0, so it'll add the number to the list.