gpt4 book ai didi

Python数学计算

转载 作者:行者123 更新时间:2023-12-01 05:09:40 25 4
gpt4 key购买 nike

PCD = int(raw_input("What is PCD?   "))


QOH = int(raw_input("Quantity of holes? "))


print "radius: ",
Radius = float(PCD)/2
print Radius


AOS = float(360)/QOH
print "Angle of Seperation: ",
print AOS

import math as M
def Y_value_1st(a, B):
a*round(M.degrees(M.sin(B)))

print Y_value_1st(Radius, AOS)

这不会打印任何内容,而不是预期的答案,有人可以帮忙吗?我是Python新手

最佳答案

你应该在函数内部返回值;

def Y_value_1st(a, B):
return a*round(M.degrees(M.sin(B)))

关于Python数学计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24427839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com