Skip to content

Commit f66ba03

Browse files
authored
Add files via upload
1 parent 4fbcd5c commit f66ba03

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Loops.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Task
2+
# Read an integer . For all non-negative integers , print . See the sample for details.
3+
4+
list1 = []
5+
j = 1
6+
if __name__ == '__main__':
7+
n = int(raw_input())
8+
for i in range(0,n-1):
9+
list1.append(j)
10+
j+=2
11+
12+
k = 0
13+
for i in range(0,n):
14+
print k
15+
if i == n-1:
16+
break
17+
else:
18+
k += list1[i]
19+

0 commit comments

Comments
 (0)