语言:Python
IDE:Python.IDE
问题描述
铅球飞行问题:给定不同投掷角度与初始速度下,求解计算铅球的飞行距离
IPO描述
I:输入:铅球发射角度、初始速度与高度
P:模拟飞行,时刻更新铅球飞行位置
O:铅球飞行距离面向过程编程
from math import pi,sin,cos,radians
def main()
angle=eval(input("Enter the launch angle:"))
vel=eval(input("Enter the initial velocity:"))
h0=eval(input("Enter the initial height:"))
time=eval(input("Enter the time interval:"))
#计算初始速度
xpos=0
y