Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary To Decimal Conversion #3495

Open
wants to merge 1 commit into
base: master
from

Conversation

@MeenakshyBS
Copy link

@MeenakshyBS MeenakshyBS commented Oct 18, 2020

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)

@TravisBuddy
Copy link

@TravisBuddy TravisBuddy commented Oct 18, 2020

Travis tests have failed

Hey @MeenakshyBS,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 1d34f920-1132-11eb-bfd1-1f84b849c73d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.