Decimal to binary conversion

    0

    0

    CrypticSai-08

    def convertBinary(num):
        binaryArray = []
        while num>0:
            binaryArray.append(num%2)
            num = num//2
        for j in binaryArray:
            print(j, end="")
    decimal_num = 21
    convertBinary(decimal_num)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.