decimal-converter

  • This little python program can convert a decimal in to,
    • Binary
    • Octal
    • Hexadecimal

Needed

  • Python 3 or later
  • or a online python compiler

How to?

  • Dowload the main.py file and open it or copy the code and paste it on a online compiler.

# Python program to convert decimal into other number systems
dec = 400

print("The decimal value of", dec, "is:")
print(bin(dec), "in binary.")
print(oct(dec), "in octal.")
print(hex(dec), "in hexadecimal.")
  • To change the decimal you want, Change it from dec = your decimal in the second rule.

Don’t just fork, star this repo too..

GitHub

View Github