Merge fbd203207f
into b47cf8261f
commit
a5168b6420
@ -0,0 +1,36 @@
|
|||||||
|
# HexToDec
|
||||||
|
|
||||||
|
**Tier:** 1-Beginner
|
||||||
|
|
||||||
|
The hexadecimal is a numbering system widely used in computing.
|
||||||
|
It is important that developers understand hexadecimal, or base 16 mathematics.
|
||||||
|
|
||||||
|
The goal of HexToDec is to practice the creation of algorithms to manage to pass from an input in hexadecimal to an output in decimal.
|
||||||
|
|
||||||
|
HecToDec allows the user to enter strings up to 4 hexadecimal digits, 0, 1, 2, etc and A, B, etc, in any order, then displays its decimal equivalent.
|
||||||
|
|
||||||
|
This challenge requires that the developer implementing it follow these constraints:
|
||||||
|
|
||||||
|
- Arrays may not be used to contain the hexadecimal digits entered by the user
|
||||||
|
- Determining the decimal equivalent of a particular hexadecimal digit in the sequence must be calculated using a single mathematical function
|
||||||
|
|
||||||
|
## User Stories
|
||||||
|
|
||||||
|
- [ ] User can enter up to 4 hexadecimal digits in one input field
|
||||||
|
- [ ] User views the results in a single output field containing the decimal (base 10) equivalent of the hexadecimal number that was entered
|
||||||
|
|
||||||
|
## Bonus features
|
||||||
|
|
||||||
|
- [ ] User can enter a variable number of hexadecimal digits
|
||||||
|
- [ ] User can enter a negative hexadecimal number
|
||||||
|
|
||||||
|
## Useful links and resources
|
||||||
|
|
||||||
|
[Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal)
|
||||||
|
|
||||||
|
## Example projects
|
||||||
|
|
||||||
|
Try not to view this until you've developed your own solution:
|
||||||
|
|
||||||
|
- [Convert Hexadecimal to Decimal in Python](https://www.delftstack.com/howto/python/hex-to-decimal-python/)
|
||||||
|
- [Python program to convert hex string to decimal](https://www.geeksforgeeks.org/python-program-to-convert-hex-string-to-decimal/)
|
Loading…
Reference in new issue