From fbd203207f400e5e229b71d7c02195a9884d4535 Mon Sep 17 00:00:00 2001 From: Antoine Meyer Date: Sun, 10 Oct 2021 16:30:35 +0200 Subject: [PATCH] New Idea: Hexadecimal converter --- Projects/1-Beginner/HexToDec.md | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Projects/1-Beginner/HexToDec.md diff --git a/Projects/1-Beginner/HexToDec.md b/Projects/1-Beginner/HexToDec.md new file mode 100644 index 00000000..553d2109 --- /dev/null +++ b/Projects/1-Beginner/HexToDec.md @@ -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/)