Skip to content

Dhikaweb7/Biner-convert-to-decimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Binary convert to decimal

Convert biner number to decimal number with Python🐍


binary to decimal conversion program with Python, I made this for a computer system lesson in the number system section in my school SMK RADEN PAKU

Running in terminal (for Linux and Mac) or cmd (for Windows)

Indonesian language 🇮🇩

Preview

Screenshot_20220730-063742

Requirement

  • Python3
  • Colorama (Optional but my prefer about the colors😅)
import colorama
from colorama import Fore, Back, Style
colorama.init(autoreset=True)
print(Fore.BLUE+"=" * 26)
print(Fore.GREEN+"MERUBAH BINER KE DESIMAL >
print(Fore.BLUE+"=" * 26)
print(Fore.CYAN+"=" * 25)
print(Fore.RED+"SMK RADEN PAKU X TKJ 1 |")
print(Fore.CYAN+"=" * 25)
b_num = list(input("MASUKAN ANGKA BINER: "))
value = 0

for i in range(len(b_num)):
        digit = b_num.pop()
        if digit == '1':
                value = value + pow(2, i)
print("Hasil desimal adalah :", value)

Install

Install Python3

apt-get-install Python3

Install Colorama

pip install colorama

Cloning repo

git clone https://github.com/Dhikaweb7/Biner-convert-to-decimal

Number of System

BINARY

DECIMAL

HEXADECIMAL

OKTAL

About

Convert biner number to decimal number with Python🐍

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages