Goal: Combine loops and conditions to filter values.
Instructions:
Create a list of sales: sales = [1200, 800, 1500, 400, 2000].
Write a for loop to iterate over the list and print:
"Above Target" for sales > 1000.
"Below Target" otherwise.
Python Code:
# Step 1: Create a list of sales
sales = [1200, 800, 1500, 400, 2000]
# Step 2: Iterate and apply conditions
for sale in sales:
if sale > 1000:
print("Above Target")
else:
print("Below Target")