Python Programming - Console Input/Output - Discussion
Discussion Forum : Console Input/Output - General Questions (Q.No. 71)
71.
How can you prompt the user to enter a series of numbers until they enter a negative number, and then print the sum of the positive numbers?
Answer: Option
Explanation:
To prompt the user to enter a series of numbers until they enter a negative number, and then print the sum of the positive numbers, use a
while
loop with a break condition.
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