Python program to convert decimal to hexadecimal using function

0
14
def dec_to_hexa(dec): 
    d = int(dec)      #d represents decimal
    print(d, " in Hexadecimal : ", hex(d))    # Prints equivalent decimal 
#____main____
dec=int(input("Please enter a number: ")) 
dec_to_hexa(dec)

    Output 1:
            Please enter a decimal number: 1234
            1234  in Hexadecimal :  0x4d2
    Output 2:
            Please enter a decimal number: 33
            33 in Hexadecimal : 0x21

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

 

 

 

Python program to convert decimal to hexadecimal using function program to convert decimal to hexadecimal using function in python decimal to hexadecimal conversion write a Python program to convert decimal to hexadecimal using function Python program to convert decimal to hexadecimal write a program to convert decimal to hexadecimal using function write a program to convert decimal to hexadecimal using function in python program to convert decimal to hexadecimal using function program to convert decimal to hexadecimal program to convert decimal to hexadecimal in python python program to convert decimal to hexadecimal using user defined function write a program to convert decimal to hexadecimal write a program to convert decimal to hexadecimal in python wap to convert decimal to hexadecimal

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here