Packaging TeX Live For MSYS2

Convert Km to Meter,Centimeter or Millimeter

Convert Km to Meter, Centimeter or Millimeter
convert kilometer to centimeter or millimeter


#Convert Km to Meter, Centimeter or Millimeter
km=int(input("K.M. : "))
v=input("KM will be changed in (M,s,m) : ")
if (v=='M'):
    ans=km*1000
elif(v=='s'):
    ans=km*100000
elif(v=='m'):
    ans=km*1000000
print("Answer : %s"%ans);

This will take user response and convert it accordingly.

Comments