Question: USING PYTHON PROGRAMMING LANGUAGE #USE LIST COMPREHENSION DON'T USE LOOP PLEASE 6) In this problem, you will write a program that will calculate the sum
USING PYTHON PROGRAMMING LANGUAGE
#USE LIST COMPREHENSION DON'T USE LOOP PLEASE
6) In this problem, you will write a program that will calculate the sum of the positive numbers that a user enters.
Here's how it should work:
User enters any number of integers
Somehow store the integers in a list (I showed several ways of doing this in class)
Create a new list of only the positive integers (Hint: filter the original list)
Once you have the list of only positive integers, use the sum function, just sum(name of list)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
