try: Kg = int(input("kg:- ")) To_gram = 1000*Kg print(Kg,"Kg = ",To_gram,"G") except: print("Mile's must be number")