This Question has been **Answered**

Featured Replies

- 1
[QUOTE=bumsfeld;1486587]Wit this: [code]import math print(math.cos((2*math.pi)/3)) # -0.5 print(0.5 + math.cos((2*math.pi)/3)) # 2.22044604925e-16 print(-0.5 + math.cos((2*math.pi)/3)) # -1.0 x = math.cos((2*math.pi)/3) print(x) # -0.5 print([x]) # [-0.4999999999999998] print([-0.5 + x]) # [-0.9999999999999998] [/code]Strange?[/QUOTE] It is not strange, because printing a float x prints str(x) in fact, while printing a list invokes … Read More

This question has already been answered. Start a new discussion instead.

Recommended Articles