convert mb to gb python

Solutions on MaxInterview for convert mb to gb python by the best coders in the world

showing results for - "convert mb to gb python"
Dee
22 Apr 2019
1try:
2    MB = int(input("How much MB:- "))
3    conversion = MB / 1024
4    print(conversion," GB")
5except ValueError:
6    print("MB must be in numerical format not the char format")
7    #numerical format --> integer
8    #char format --> string
Julie
17 Nov 2019
1try:
2    gb = int(input("How much Gb:- "))
3    conversion = gb * 1024
4    print(conversion," MB")
5except ValueError:
6    print("GB must be in numerical format not the char format")
7    #numerical format --> integer
8    #char format --> string