Updated: Dec 16, 2021
See the flowchart below to understand how the code will work.
ListSum =  #crate a empty list in Python #takes input for number of elements in list num = int(input("How many numbers you want to Add: ")); for n in range(num): numbers=int(input("Enter numbers: ")); ListSum.append(numbers) print("Sum of numbers in list: ",sum(ListSum))
You can also add Negative number in the list. See the out below :
The Tech Platform