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?
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers