In this article, we will show you, How to write a Python Program to Calculate Square of a Number using Arithmetic Operators, and Functions with example.

## Python Program to Calculate Square of a Number

This Python program allows the user to enter any numerical value. Next, it will finds the square of that number using Arithmetic Operator

# Python Program to Calculate Square of a Number number = float(input(" Please Enter any numeric Value : ")) square = number * number print("The Square of a Given Number {0} = {1}".format(number, square))

**OUTPUT**

## Python Program to find Square of a Number Example 2

This is same as above but this time we are using the Exponent operator.

# Python Program to Calculate Square of a Number number = float(input(" Please Enter any numeric Value : ")) square = number ** 2 print("The Square of a Given Number {0} = {1}".format(number, square))

**OUTPUT**

## Python Program to find Square of a Number using Functions

In this example, we are defining a function that will calculate the square of a number

# Python Program for Square of a Number def square(num): return num * num number = float(input(" Please Enter any numeric Value : ")) sqre = square(number) print("The Square of a Given Number {0} = {1}".format(number, sqre))

**OUTPUT**