From 80593c4b0df4f5c27935a370e9cbb462b3886638 Mon Sep 17 00:00:00 2001 From: siddhiavhad27 Date: Tue, 7 Apr 2026 17:30:43 +0000 Subject: [PATCH] Add README.md --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..88125dc --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +Week 2 Day 3 – Number Analyzer + +Project Overview + +This project is a JavaScript-based web application that analyzes numbers using loops. It identifies whether numbers are **even, odd, and prime**, and provides a summary count. + +Features + +* Takes user input +* Generates numbers from 1 to input +* Identifies: + + * Even numbers + * Odd numbers + * Prime numbers +* Displays total counts +* Dynamic UI update + +Tech Stack + +* HTML5 +* CSS3 +* JavaScript (Vanilla JS) + +How It Works + +1. User enters a number +2. Loop runs from 1 to input +3. For each number: + + * Even → i % 2 === 0 + * Odd → else + * Prime → checked using divisor loop +4. Counters track totals +5. Output displayed dynamically + +Key Concepts Used + +* for loops +* Nested loops +* Conditional statements +* Prime number logic +* Counters (frequency counting) +* DOM manipulation + +Output Example + +Input: 5 + +1 - Odd +2 - Even | Prime +3 - Odd | Prime +4 - Even +5 - Odd | Prime + +Total Even Numbers: 2 +Total Odd Numbers: 3 +Total Prime Numbers: 3 + +Future Improvements + +* Optimize prime check (√n method) +* Add input validation +* Add reset button +* Highlight primes with color + +Learning Outcome + +* Understanding of loops and nested loops +* Implementation of mathematical logic +* Real-world problem solving using JavaScript +* Efficient use of counters and conditions + +