vSquared = v ** 2
force = -14.7 * vSquared
change =
yForce =
yChange =
This is what I got, but when I print it off to the console, it gives me a number in the millions. Am I doing something wrong?
Could you explain the equation to me? Also, I could just calculate the resistance for one tenth of a second, and then multiply by the variable time to get the total distance traveled left or right?
Sorry, I didn't know if you knew code.
I'm using python for this project.
The code would look something like:
newvar = .1
And as long as I have the equation, I can figure out the code for it. I just need the formula really, and maybe an explanation for it.
I could use my original variable, time, to find one tenth of a second, the line would look like this.
variable is time
time - time + .1 = new variable
That would be easy to find, however, I don't know how to calculate the decline of velocity. I'm not currently a physics student, I'm taking that...
This is what my code prints out for the user.
Attempt 1
-----------
The target is 2914 feet away.
Input the velocity.400
Input the launch angle15
Too short.
You were 414.00 feet away!
Distance traveled was 2500.00 feet
It took you 6 seconds travel time.
I want to add code to calculate how...
Homework Statement
I'm currently in computer programming class, and I've finished a project and want to improve on it. We had to figure out how to calculate the gravitational acceleration and time traveled of a projectile to hit a target. I'd like to add horizontal variables in my code, like...