Monday, March 5, 2018

Number cos() Method


Number cos() Method in Python 3:


The cos() method returns the cosine of x radians.
Syntax
import math
cos(x)

Note: This function is not accessible directly, so we need to import the math module and then we need to call this function using the math static object.

Parameters
x - This must be a numeric value.
Return Value
This method returns a numeric value between -1 and 1, which represents the cosine of the angle.

Example


and the output is: