Python Programs to Calculate Acceleration, Final Velocity and Initial Velocity Using Function

 



1) Acceleration

Code:

def a(v1,v2,t1,t2):
  acceleration = (v2 - v1) / (t2-t1)
  print("Acceleration = ", acceleration)

a(0,10,0,20)

Output:

Acceleration =  0.5


2) Initial Velocity

Code:

def iv(a,v2,t1,t2):
  v1 = v2 - a * (t2-t1)
  print("Initial Velocity = ", v1)

iv(1,30,0,20)

Output:

Initial Velocity =  10


3)Final Velocity

Code:

def fv(a,v1,t1,t2):
  v2 = v1 + a * (t2-t1)
  print("Final Velocity = ", v2)

fv(1,30,0,20)

Output:

Final Velocity =  50


AJ Blogs

Hello everyone, My name Arth and I like to write about what I learn. Follow My Website - https://sites.google.com/view/aj-blogs/home

Post a Comment

Previous Post Next Post
Best Programming Books

Facebook

AJ Facebook
Checkout Our Facebook Page
AJ Blogs
Checkout Our Instagram Page