-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
added decimal to hexadecimal conversion #977
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
Conversation
If I add this line
This link might help you to troubleshoot the KeyError. https://wiki.python.org/moin/KeyError |
Thank you for bringing this to my attention. After combing through the algorithm again I believe I have found the error that would cause the key to go out of bounds as the number of digits necessary increase. I will fix this as soon as I get home. |
The program has now been revised. I used 999,098 as a test and checked the results with a calculator, which came back as successful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. OPTIONAL: Our automated testing will run doctests so it would be really cool to add some of those.
I honestly don't know much about automated testing, but it's something I'd be happy to look into in the future. I'm currently about to head to the airport for a trip I'm taking, and I won't be able to sit down in front of a computer for a couple weeks. I won't even have internet access through my phone in a few days, so if anyone posts comments just know that I'll get to them when I can in about two weeks. |
Cool. Let's land this one now and you can pick up tests when you return. Read thru the doctest page on your flight because it is simple but really helpful to have tests on your code. Safe travels. |
* added decimal to hexadecimal conversion * fixed error occuring as more digits were needed
I didn't update the directory because I noticed that the other conversion algorithms were not listed