MCPcopy Create free account
hub / github.com/geekcomputers/Python / decimalToBinary

Function decimalToBinary

decimal to binary.py:1–6  ·  view source on GitHub ↗

This function converts decimal number to binary and prints it

(num)

Source from the content-addressed store, hash-verified

1def decimalToBinary(num):
2 """This function converts decimal number
3 to binary and prints it"""
4 if num > 1:
5 decimalToBinary(num // 2)
6 print(num % 2, end="")
7
8
9# decimal number

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected