Skip to content

Instantly share code, notes, and snippets.

@m-stafford
Created August 15, 2016 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-stafford/907c1002d73caf5aa198ff4e016da788 to your computer and use it in GitHub Desktop.
Save m-stafford/907c1002d73caf5aa198ff4e016da788 to your computer and use it in GitHub Desktop.
count_from = 100
sub_by = 1
iteration = 0
i = 0
while (count_from >= 0):
if ((i+1) % 10 == 0):
iteration += 1
print(count_from)
count_from = (count_from - (sub_by + iteration))
i += 1
@m-stafford
Copy link
Author

m-stafford commented Aug 15, 2016

Output:

99
98
97
96
95
94
93
92
91
89
87
85
83
81
79
77
75
73
71
68
65
62
59
56
53
50
47
44
41
37
33
29
25
21
17
13
9
5
1```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment