my_first_script.py

my_first_script.py#

import numpy as np

def nerdy_computation(x):
    """Returns the sum of the squares of the first x natural numbers using numpy."""
    numbers = np.arange(1, x + 1)
    squares = np.square(numbers)
    return np.sum(squares)

print("Hello MUDE! Let's compute something nerdy:")
result = nerdy_computation(10)
print(f"The sum of the squares of the first 10 natural numbers is {result}")