Calculate Square Roots Using np.sqrt()
📖 Scenario: You work in a bakery that wants to analyze the sizes of square cake pans. You have a list of areas of square pans, and you want to find the length of one side of each pan.
🎯 Goal: Use np.sqrt() to calculate the side lengths from the given areas.
📋 What You'll Learn
Create a numpy array called
areas with the exact values: 16, 25, 36, 49, 64Create a variable called
side_lengths that stores the square roots of the areas array using np.sqrt()Print the
side_lengths array💡 Why This Matters
🌍 Real World
Calculating square roots is useful in many fields like baking, construction, and science when you need to find side lengths from areas.
💼 Career
Data scientists often use numpy functions like <code>np.sqrt()</code> to quickly perform mathematical operations on data arrays.
Progress0 / 4 steps