8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47f6b3c + ba737a0 commit 3b22d09Copy full SHA for 3b22d09
sum_elements_list.py
@@ -1,8 +1,11 @@
1
__author__ = 'Avinash'
2
+__author1__ = 'ramlaxman'
3
4
lst = []
-num = int(input('How many numbers: '))
5
-for n in range(num):
6
- numbers = int(input('Enter number '))
7
- lst.append(numbers)
+total = int(input('Total numbers in List: '))
+
+for num in range(total):
8
+ num = int(input('Enter number '))
9
+ lst.append(num)
10
11
print("Sum of elements in given list is :", sum(lst))
0 commit comments