未从python math cod接收正确的输出

2024-09-27 07:30:01 发布

您现在位置:Python中文网/ 问答频道 /正文

你知道为什么下面的代码会产生错误的计算吗?可能只是语法不正确

import math
ax = distance1 * math.cos(direction1)

distance1设置为7600。 并且direction1被设置为113

在普通计算器中,113的余弦的7600倍等于-2969.556576518480538.

但是上面的代码产生7564.02643525


Tags: 代码import错误语法mathcosax计算器

热门问题