Skip to content

Instantly share code, notes, and snippets.

@Matts966
Created May 7, 2018 04:17
Show Gist options
  • Save Matts966/03eb7940ce0a72773ddcd6fda8a02539 to your computer and use it in GitHub Desktop.
Save Matts966/03eb7940ce0a72773ddcd6fda8a02539 to your computer and use it in GitHub Desktop.
v = [0]; x = [100]; a = []
t = n = 0
T = 5
h = 1
output_required_t = []
while t < T:
a.append(-10)
if t % 1 == 0:
print(v[n], x[n])
v.append(v[n] + a[n] * h)
x.append(x[n] + v[n] * h)
n += 1; t = n * h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment