Prepare repository for merge

This commit is contained in:
Angelos Chalaris
2023-05-01 22:43:50 +03:00
parent ab1ea476c5
commit a5ca5190e5
169 changed files with 0 additions and 626 deletions

21
python/snippets/to-hex.md Normal file
View File

@ -0,0 +1,21 @@
---
title: Number to hex
type: snippet
tags: [math]
cover: green-plant
dateModified: 2020-10-09T09:45:47+03:00
---
Returns the hexadecimal representation of the given number.
- Use `hex()` to convert a given decimal number into its hexadecimal equivalent.
```py
def to_hex(dec):
return hex(dec)
```
```py
to_hex(41) # 0x29
to_hex(332) # 0x14c
```