Python Programming - Console Input/Output - Discussion
Discussion Forum : Console Input/Output - General Questions (Q.No. 56)
56.
How can you print the sum of all odd numbers from 1 to 10?
Answer: Option
Explanation:
To print the sum of odd numbers from 1 to 10, use
print(sum(range(1, 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