Answer to Question #264570 in Python for swsq

Question #264570

a python program to Count of negative elements in the list (-7-9 3 4 5 -6 -8 2)


1
Expert's answer
2021-11-13T12:42:01-0500
 def l_count(list1):
    j = 0
    for i in list1:
        if i < 0:
            j = j + 1
    return j
l_count([-7,-9,3,4,5,-6,-8,2])
4

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog