Advertisement
biswasrohit20

2

Apr 4th, 2021
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. le = int(input("How many numbers:"))
  2. l = []
  3. for i in range(le):
  4. num = int(input("Enter a number:"))
  5. l.append(num)
  6.  
  7. total = 0
  8. for i in l:
  9. total += i
  10.  
  11. print("The total is " + str(total))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement