Computer Science, asked by muskansingh112200, 6 months ago

convert 1101 bianry to decimal in Python​

Answers

Answered by rrahman482000
2
Your answer is 13 ( thirteen)

Hope it helps you
Answered by ss0680300
2

Answer:

13

Explanation:

Python Code: b_num = list(input("Input a binary number: ")) value = 0 for i in range(len(b_num)): digit = b_num.pop() if digit == '1': value = value + pow(2, i) print("The decimal value of the number is", value)

Similar questions