OS4P_2026/simulation.py
2026-09-10 15:33:58 +02:00

10 lines
270 B
Python

# a funny python file
# Simulation of a falling body on Earth
ACCELERATION_G = 9.80665 # 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")