10000 Merge pull request #1 from ramlaxman/master · aworleo/programminginpython.com@3b22d09 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b22d09

Browse files
authored
Merge pull request avinashn#1 from ramlaxman/master
meaningful var names
2 parents 47f6b3c + ba737a0 commit 3b22d09

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

sum_elements_list.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
__author__ = 'Avinash'
2+
__author1__ = 'ramlaxman'
23

34
lst = []
4-
num = int(input('How many numbers: '))
5-
for n in range(num):
6-
numbers = int(input('Enter number '))
7-
lst.append(numbers)
5+
total = int(input('Total numbers in List: '))
6+
7+
for num in range(total):
8+
num = int(input('Enter number '))
9+
lst.append(num)
10+
811
print("Sum of elements in given list is :", sum(lst))

0 commit comments

Comments
 (0)
0