Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 53)
53.
How can you print the sum of even numbers from 1 to 10?
print(sum(range(2, 11, 2)))
even_sum(1, 10)
print(even_numbers_sum(1, 10))
sum_even(range(1, 11))
Answer: Option
Explanation:
To print the sum of even numbers from 1 to 10, use sum(range(2, 11, 2)).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.