Skip to content

NecroticFactor/Poll_Calculator

Repository files navigation

Poll Result Calculator

The Poll Result Calculator is a simple tool to calculate the total number of votes and the percentage of each vote option in a poll. It helps visualize the vote distribution and determine the percentage share of each option from the total votes.

Features

  • Total Vote Calculation: Automatically calculates the total votes from the input.
  • Percentage Calculation: Displays the percentage share of each vote option relative to the total.

Getting Started

Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You’ll need the following tools installed on your machine:

  • Node.js (v14 or higher)
  • npm (comes with Node.js)

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/poll-result-calculator.git
  2. Navigate to the project directory:

    cd poll-result-calculator
  3. Install the required dependencies:

    npm install

Running the Application

You can run the application using the following commands:

  • Run the project in development mode:

    This will start the project in development mode with live reloading for any code changes.

    npm run dev
  • Run the project in production mode:

    This will build and run the project optimized for production.

    npm start

Example Usage

  1. Input the total number of votes and the count for each option.
  2. The calculator will output the total votes and the percentage for each option.

For example:

  • Option A: 30 votes
  • Option B: 20 votes
  • Total Votes: 50
  • Percentage for Option A: 60%
  • Percentage for Option B: 40%

Built With

  • React.js
  • npm

Contributing

If you'd like to contribute, feel free to create a pull request or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Calculate the results of your poll

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published