Added decimal to hex conversion

This commit is contained in:
Prachee Javiya
2020-10-09 11:56:37 +05:30
parent 3f04a9ee16
commit bf1afde0f7

18
snippets/dec_to_hex.md Normal file
View File

@ -0,0 +1,18 @@
---
title: decimal to hexadecimal
tags: conversion, beginner
---
Returns hexadeciaml equivalent of decimal
- Use `hex()` function for conversion
```py
def conversion(dec):
return hex(dec)
```
```py
conversion(41) #29
conversion(332) #14C
```