Computer Science, asked by nneelamsingh37, 8 months ago

plzz guys help me....write a program to find out the sum of the given numbers.2,4,6,8​

Answers

Answered by bktbunu
1

Explanation:

python program to find the sum of given numbers

nums = [int(n) for n in input("Enter the numbers: ").split(" ")]

print("The numbers are: ", nums)

print("The sum of given numbers = ", sum(nums))

Output:

Enter the numbers: 10 20 30 40

The numbers are: [10, 20, 30, 40]

The sum of given numbers = 100

Similar questions