Skip to content

Instantly share code, notes, and snippets.

@Matts966
Created May 7, 2018 05:17
Show Gist options
  • Save Matts966/77d3eb16191f6b122b943165a0d9774f to your computer and use it in GitHub Desktop.
Save Matts966/77d3eb16191f6b122b943165a0d9774f 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