+ 1

Can Someone help me with understanding how to write a function? For Python.

Hey, so right now I have to take an Intro to Computing class, but my professor isn’t the best and I get overwhelmed by anything math related (I have to take this class because I’m a Digital Arts Major). He’s asking us to make a program that allows the user to input values for three projectile motion equations: Horizontal Distance (x = (vx0)t), Vertical Height (y = vy0)t - (1/2)gt^2), and Vertical Velocity (vy = (vy0) - gt). The value g = 9.8 m/s^2 which is the exceleration of gravity. 1. your program must ask the user to input values for the initial velocity in the x-direction, initial velocity in the y-direction (both in meters per second, or m/s) and time (in seconds, or s) using good descriptions that make it clear what you are asking for 2. your program must calculate Horizontal distance traveled (in meters), vertical height of object (in meters, or m), and vertical velocity (in m/s) and store those values to variables 3. your program must print the output calculated above nicely using the format() function with only two decimal places of precision for each variable Im incredibly confused. This is our first assignment and he only went over 1 problem vaguely similar to this one. He’s also notorious for getting off track, so I have no idea what to do.

30th Aug 2019, 1:57 PM
Blair Green
Blair Green - avatar
1 ответ