Skip to content

jjacoboflorez95/test-scores-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ† Test Scores Processor

πŸ“Œ Project Overview

Test Scores Processor is a Node.js application designed to process test scores entered via command-line arguments. The script calculates the average score and displays all provided scores in a formatted manner. This lightweight application is ideal for quick score analysis without needing external dependencies.

Developed as part of a professional portfolio, this project highlights command-line processing, input validation, and JavaScript array operations.


πŸš€ Features

  • πŸ“Š Processes test scores entered as command-line arguments.
  • πŸ”’ Calculates the average score based on user input.
  • πŸ–₯️ Command-line execution, making it lightweight and efficient.
  • ⚠ Error handling to validate input and prevent invalid operations.

πŸ›  Technologies Used

  • Node.js β†’ JavaScript runtime environment.
  • JavaScript (ES6+) β†’ Implements functions using modern JS syntax.

🎯 Project Purpose

This project demonstrates:

  • βœ… Processing command-line arguments in Node.js.
  • βœ… Performing calculations and array operations in JavaScript.
  • βœ… Validating user input and handling errors effectively.
  • βœ… Building lightweight CLI tools for automation and data processing.

πŸ“‚ Project Structure

πŸ“ test_scores
 β”œβ”€β”€ πŸ“„ index.js  # Main Node.js script

πŸ“Œ Prerequisites

Before running the script, ensure Node.js is installed. Verify with:

node -v

πŸƒβ€β™‚οΈ How to Use

1️⃣ Open a terminal and navigate to the project folder:

cd test_scores

2️⃣ Run the script by providing test scores as arguments:

node index.js 89 100 92 93

πŸ“ Example Output

If executed with:

node index.js 89 100 92 93

The console output will be:

All scores: 89, 100, 92, 93
Average score: 93.5

⚠️ Error Handling

  • If no scores are provided, the script will display:
Error:
Please enter at least one score.
  • If a non-numeric value is entered, the script will display:
Error:
All scores must be numbers.
Invalid score detected: <invalid_value>

🌟 Future Improvements

  • πŸ“Š Median and Mode Calculation – Extend functionality to calculate more statistics.
  • πŸ“‚ Export Results – Save results to a file instead of just displaying them.
  • πŸ“€ Integration with Databases – Store and retrieve test scores from a database.
  • πŸ“ˆ Graphical Output – Display scores in a visual format using a graphing library.

πŸ“œ License

This project is licensed under the MIT License.


πŸ’Ό Author

πŸ‘€ Juan Jacobo Florez Monroy
🌐 Portfolio: jjacobo95.com
πŸ™ GitHub: github.com/jjacoboflorez95

About

A Node.js CLI application for processing test scores, calculating averages, and validating input.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published