Physics Game Engine
You are part of a dynamic team that is creating an immersive physics simulation game. Your role is to develop a Python module that can simulate the fundamental laws of motion. This module, named physics.py
, should contain functions to calculate velocity()
, acceleration()
, and force()
:
velocity()
: there are two parameters -distance
(in meters) andtime
(in seconds).acceleration()
: there are three parameters -initial_velocity
(in m/s),final_velocity
(in m/s), andtime
(in seconds).force()
: there are two parameters -mass
(in kg) andacceleration
(in m/s^2). Remember, force is the product of mass and acceleration (F = ma
).
The input and output will be handled by the main.py
module, you just need to implement the physics.py
module.
Input | Output |
---|---|
| 12.0 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB