Skip to content

RedEdge967/decimal-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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..⭐