Created
July 10, 2019 16:48
-
-
Save Cyborg-Model-Z/285f3cae932eafdcc7b9f7b64df34b86 to your computer and use it in GitHub Desktop.
count by x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @camsbury | |
| I'm having trouble figuring out how to count by a certain number- the formula is (x,y) where for y numbers you count by x, aka (2,5) would return [2,4,6,8,10] | |
| ``` | |
| def count_by(x, n): | |
| while n>0: | |
| lst=[] | |
| lst.append(x+x) | |
| n=n-1 | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment