Hey all. My first post here. Currently taking a programming course and having a little trouble getting the right code sorted out.
the problem is to create a code that will take a ball (with only vertical displacement, h) and will output the final height and velocity at a time tf. all depending on the coefficient of restitution, alpha.
now i figured i need a for loop and if statements for when h<=0, the formulas need to reset. here is what i have so far and am really clueless as to what i need to do to fix the issue.