Tuesday 29 November 2016

To calculate Kinetic Energy of an object


# To calculate Kinetic Energy of an object

#Input

mass = float(input("Enter the value of Mass: "))
velocity = float(input("Enter the value of velocity :"))

# Calculation

ke = float(1)/2 * mass * (velocity ** 2)

#print

print "Kinetic Energy of an object is : ",ke,"Joule"


Output

Enter the value of Mass: 34.52
Enter the value of velocity :424.2
Kinetic Energy of an object is :  3105861.7464 Joule

3 comments: