This project is a solution to the "Classificador de nível de Herói" challenge proposed by the DIO.me course. The goal of this challenge is to implement a system that classifies a hero's level based on their experience (XP), using fundamental programming concepts such as variables, operators, loops, and decision structures.
The application must:
- Request the hero's name and their experience points (XP).
- Classify the hero's level according to the following table:
- XP < 1,000 → Iron
- 1,001 ≤ XP ≤ 2,000 → Bronze
- 2,001 ≤ XP ≤ 5,000 → Silver
- 5,001 ≤ XP ≤ 7,000 → Gold
- 7,001 ≤ XP ≤ 8,000 → Platinum
- 8,001 ≤ XP ≤ 9,000 → Ascendant
- 9,001 ≤ XP ≤ 10,000 → Immortal
- XP ≥ 10,001 → Radiant
- Display a message with the hero's level in the following format:
The Hero named {name} is at the level of {level}.
- Variables
- Operators
- Loops
- Decision Structures
-
Install Node.js
First, you need to have Node.js installed on your computer. If you haven't done so yet, download and install it from the official website: -
Clone this repository:
git clone https://github.com/annielymariah/hero-level-classifier-DIO.git
-
Navigate to the project directory:
cd hero-level-classifier-DIO
-
Install the dependencies:
Before running the script, you need to install the required dependencies. Run the following command:npm install
-
Run the script:
After installing the dependencies, execute the project with:npm start
-
Follow the on-screen prompts to input the hero's name and experience points (XP).