Program to calculate length of diagonal of a square | Python3 program for the above approach ; Function to find the length of the diagonal of a square of a given side ; Driver Code
import math NEW_LINE def findDiagonal ( s ) : NEW_LINE INDENT return math . sqrt ( 2 ) * s NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT S = 10 NEW_LINE print ( findDiagonal ( S ) ) NEW_LINE DEDENT