projectile problem. As input, the function will take the initial height (y0) from which the projectile is launched, the initial velocity, and the angle in degrees which the initial velocity makes with the horizontal (positive if above the horizontal, negative if below the horizontal). The function should calculate the time T the projectile stays in air, generate a time array (0, T/100, 2T/100, 3T/100, …, T), and return the values of x and y (the components of the position vector of the projectile) at the times in the array
Write a function which solves a projectile problem. As input, the function will take the initial height (y0) from which the projectile is launched, the initial velocity, and the angle in degrees which the initial velocity makes with the horizontal (positive if above the horizontal, negative if below the horizontal). The function should calculate the time T the projectile stays in air, generate a time array (0, T/100, 2T/100, 3T/100, …, T), and return the values of x and y (the components of the position
Use phyton language
pls put output screenshot
import math
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images