Python Program to calculate the square of a given number.
Dec 31, 2023
Square Formula x²
def calculate_square(number):
return number * number
numbers = [1,3,5,10]
for number in numbers:
print(f"The square of {number} is {calculate_square(number)}.")
#Result
The square of 1 is 1.
The square of 3 is 9.
The square of 5 is 25.
The square of 10 is 100.