九州体育网 - 十年信誉网站

关于作者

Discuss / Python / 返回多个值之例题代码

返回多个值之例题代码

Topic source

一场未做完的梦

#1 Created at ...

例题中给出的求位移后的坐标代码为: import math

def move(x, y, step, angle=0): nx = x + step math.cos(angle) ny = y - step math.sin(angle) return nx, ny 个人认为其中的 ny = y - step math.sin(angle)应为 ny = y + step math.sin(angle) 请赐教


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.