Find N values of X1 , X2 , ... Xn such that X1 < X2 < ... < XN and sin ( X1 ) < sin ( X2 ) < ... < sin ( XN ) | Python3 program for the above approach ; Function to print all such Xi s . t . all Xi and sin ( Xi ) are strictly increasing ; Till N becomes zero ; Find the value of sin ( ) using inbuilt function ; increment by 710 ; Driver Code ; Function Call
import math NEW_LINE def printSinX ( N ) : NEW_LINE INDENT Xi = 0 ; NEW_LINE num = 1 ; NEW_LINE while ( N > 0 ) : NEW_LINE INDENT print ( " X " , num , " = " , Xi , end = " ▁ " ) ; NEW_LINE print ( " sin ( X " , num , " ) ▁ = " , end = " ▁ " ) ; NEW_LINE print ( " { : . 6f } " . format ( math . sin ( Xi ) ) ,   " " ) ; NEW_LINE num += 1 ; NEW_LINE Xi += 710 ; NEW_LINE N = N - 1 ; NEW_LINE DEDENT DEDENT N = 5 ; NEW_LINE printSinX ( N ) NEW_LINE