human
Program to calculate Kinetic Energy and Potential Energy | Function to calculate Kinetic Energy.
Stores the Kinetic Energy.
Function to calculate Potential Energy.
Stores the Potential Energy.
Driver Code"
Solution in Python:
assistant
#Here is code to program to calculate Kinetic Energy and Potential Energy and the other steps required.
 def kineticEnergy ( M , V ) :
	KineticEnergy = 0.5 * M * V * V
	return KineticEnergy
def potentialEnergy ( M , H ) :
	PotentialEnergy = M * 9.8 * H
	return PotentialEnergy
if __name__ == " _ _ main _ _ " :
	M = 5.5
	H = 23.5
	V = 10.5
	print ( " Kinetic ▁ Energy ▁ = ▁ " , kineticEnergy ( M , V ) )
	print ( " Potential ▁ Energy ▁ = ▁ " , potentialEnergy ( M , H ) )