gzdyleon revised this gist . Go to revision
No changes
gzdyleon revised this gist . Go to revision
1 file changed, 6 insertions, 3 deletions
gistfile1.txt
@@ -1,4 +1,7 @@ | |||
1 | - | def main(): | |
2 | - | pass | |
1 | + | def sum_num(n): | |
2 | + | result = 0 | |
3 | + | for i in range(1, n+1): | |
4 | + | result += i | |
5 | + | return result | |
3 | 6 | ||
4 | - | def | |
7 | + | sum_num(100) |
gzdyleon revised this gist . Go to revision
No changes
gzdyleon revised this gist . Go to revision
1 file changed, 4 insertions
gistfile1.txt(file created)
@@ -0,0 +1,4 @@ | |||
1 | + | def main(): | |
2 | + | pass | |
3 | + | ||
4 | + | def |