From 9f57dddd92281d0cb6d43c90a1fe2aaf5adf0e18 Mon Sep 17 00:00:00 2001 From: Donald Calloway Date: Mon, 29 Sep 2025 10:26:30 -0700 Subject: [PATCH] modified line 11 to add 20 to elements > 10 --- array_manipulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/array_manipulation.py b/array_manipulation.py index 3e61678..d298eaa 100644 --- a/array_manipulation.py +++ b/array_manipulation.py @@ -7,8 +7,8 @@ This script demonstrates basic NumPy array manipulation: """ # Product prices prices = np.array([15, 8, 22, 7, 12, 5]) -# Assign 20 to every price greater than 10 -prices[prices > 10] = 20 +# Add 20 to every price greater than 10 +prices[prices > 10] += 20 # Product ratings for two categories over three criteria ratings = np.array([[6, 8, 9], [7, 5, 10]])