Kebab file names

This commit is contained in:
Angelos Chalaris
2023-04-27 22:00:06 +03:00
parent b9c77eb413
commit f6a215e9e3
107 changed files with 0 additions and 0 deletions

20
snippets/to-binary.md Normal file
View File

@ -0,0 +1,20 @@
---
title: Number to binary
tags: math
cover: digital-nomad-13
firstSeen: 2020-10-07T19:46:01+03:00
lastUpdated: 2020-10-07T19:46:01+03:00
---
Returns the binary representation of the given number.
- Use `bin()` to convert a given decimal number into its binary equivalent.
```py
def to_binary(n):
return bin(n)
```
```py
to_binary(100) # 0b1100100
```