### Instruction: Compute $\cos 240^\circ$. Let's write a program.### Response: import math

# convert degrees to radians
radians = math.radians(240)

# calculate cos
cos_val = math.cos(radians)

print(cos_val)