simulation.py: add

This commit is contained in:
Luc Bijl 2026-09-10 15:30:25 +02:00
parent d3e60e6d5a
commit 188855e5d2

10
simulation.py Normal file
View file

@ -0,0 +1,10 @@
# a funny python file
# Simulation of a falling body on Earth
ACCELERATION_G = 10 # m/s^2
TIME = 5.0 # seconds
def calculate_displacement(g, t):
return 0.5 * g * (t ** 2)
print(f"Displacement after {TIME}s: {calculate_displacement(ACCELERATION_G,TIME)} meters")