cos^2 x formula code example Example: cos2x import math num = int(input("Enter an angle (in degrees)")) print(math.cos(2*num))