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) and time (in seconds).

  • acceleration(): there are three parameters - initial_velocity (in m/s), final_velocity (in m/s), and time (in seconds).

  • force(): there are two parameters - mass (in kg) and acceleration (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

print(velocity(120, 10)); print(acceleration(0, 20, 10)); print(force(5, 2))

12.0
2.0
10

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue