try: MB = int(input("How much MB:- ")) conversion = MB / 1024 print(conversion," GB") except ValueError: print("MB must be in numerical format not the char format") #numerical format --> integer #char format --> string