# 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 "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
Sir why float(1) is taken?
ReplyDeleteFor Casting
DeleteA blog like yours should be earning much money from adsense..-.,” https://python.engineering/python-printing-list-vertically/
ReplyDelete