Question: Consider the following code segment. theList[-2, -1, 0, 1, 2] count10 count20 FOR EACH value IN theList IF(value > 0) X count1 counti+1 ELSE
Consider the following code segment. theList[-2, -1, 0, 1, 2] count10 count20 FOR EACH value IN theList IF(value > 0) X count1 counti+1 ELSE count2count2 + 1 What are the values of count1 and count2 as a result of executing the code segment?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
