plzz guys help me....write a program to find out the sum of the given numbers.2,4,6,8
Answers
Answered by
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