Pps Project
Pps Project
Submitted by
I SEMESTER/ I YEAR
BONAFIDE CERTIFICATE
Certified that this project report titled SIMPLE VOTING SYSTEM is the bonafide
work of Ms.NANDASHREE (RA2411042020043), Ms SUGU PRIYA S
(RA2411042020055), Ms.VANI BEDIA (RA2411042020008) , who carried out the
project work under my supervision. This Case study work confirms to 21CSS101J-
PROGRAMMING FOR PROBLEM SOLVING , I Semester, I year, 2024-2025 ODD
Semester.
SIGNATURE
Mr.B. SACHIN ADITYA
M.TECH., Associate Professor
Computer Science and Engineering,
SRM Institute of Science and Technology,
Ramapuram, Chennai.
TABLE OF CONTENT
1 Introduction
2 Problem statement
3 System Specification
2.1 Hardware Specification
2.2 Software Specification
4 Flow Diagram / Architecture Diagram
(Flowchart/algorithm)
6 Source code
7 Output
8 Conclusion
9 References
INTRODUCTION OF THE PROJECT
The objective of this project is to create a Python-based simple voting system that enables users
to vote for their chosen candidate(s) from a predefined list. The system should be able to perform
the following tasks:
1. Vote Collection: The system will allow a predefined number of voters to cast a vote for one
of the registered candidates. Each voter can only vote once, and the vote will be registered for
one candidate only.
2. Vote Validation: The system must validate user input to ensure that votes are cast for valid
candidates. If a user attempts to vote for an invalid candidate or enters incorrect data, the
system should prompt them to select a valid candidate.
3. Result Calculation: After all votes have been cast, the system will tally the votes for each
candidate. It will display the total votes received by each candidate.
4. Winner Determination: The system will determine the winner based on the highest number
of votes. In the event of a tie, the system will notify the users about the tie and list the tied
candidates.
5. User Interface: The system should be interactive and user-friendly. The user interface
should be text-based, allowing the user to input their selection through the command line.
This simple voting system will allow users to understand the fundamentals of vote processing,
input validation, and result calculation while also providing a foundation for implementing more
complex voting mechanisms in the future.
SYSTEM REQUIREMENTS
SOFTWARE REQUIREMENTS:
1. Python:
o Version: Python 3.x (latest stable release recommended).
o Download: python.org.
2. Text Editor or IDE:
o Visual Studio Code (VSCode): Lightweight and customizable.
o PyCharm: Full-featured IDE for Python development.
o Sublime Text, Atom, IDLE: Other popular choices.
o Jupyter Notebook: Interactive environment for data science projects.
3. Command-Line Interface (CLI):
o Windows: Use Command Prompt or PowerShell.
o MacOS/Linux: Use the Terminal.
4. Libraries (Optional):
o Pip: Python’s package manager for installing third-party libraries.
o Libraries like NumPy, Flask, or Tkinter for specific applications (e.g., data science,
web development, or GUI).
5. Operating System:
o Windows: Windows 10/11 (older versions work with slight limitations).
o MacOS: macOS 10.10 or later.
o Linux: Most modern distributions (Ubuntu, Fedora, etc.).
HARDWARE REQUIREMENTS:
1. Processor:
o Minimum: 1 GHz (Intel or AMD).
o Recommended: 2 GHz or higher for more complex tasks.
2. RAM:
o Minimum: 1 GB.
o Recommended: 4 GB or more for larger projects.
3. Storage:
o Minimum: 500 MB free space (for Python installation and basic projects).
o Recommended: 1 GB or more for larger projects.
4. Graphics (Optional):
o For graphical tasks or visualizations, any standard integrated or discrete graphics
card is sufficient.
ARCHITECTURE DIAGRAM
EXPLANATION
This program simulates a simple voting system where voters choose between three candidates:
Shivani, Srivarsha, and Jeeva. It collects votes, handles invalid inputs, and displays the results with
the winner or a tie.
1. Display Welcome Message: The program starts by displaying a welcome message and listing
the available candidates (Shivani, Srivarsha, Jeeva).
2. Input Number of Voters: The user is prompted to enter the number of voters, which is
stored in the variable x. This value defines the number of iterations in the vote collection loop.
3. Initialize Vote Counters: Three variables (votes1, votes2, votes3) are initialized to zero to
track the votes for each candidate.
4. Collect Votes: The program enters a loop, asking each voter to choose a candidate by
entering a number (1, 2, or 3). Based on the input, the respective vote counter is
incremented. Invalid inputs trigger an error message and restart the voting process.
5. Display Total Votes: After all votes are collected, the total number of votes for each
candidate is displayed.
6. Determine Winner or Tie: The program compares the vote counts to declare a winner or
identify if there’s a tie between candidates.
7. End: The program ends after displaying the results, ensuring valid inputs were provided
throughout the process.
This methodology ensures accurate voting and result determination, handling invalid inputs and
displaying the final results clearly.
SOURCE CODE
def votingsystem():
print("WELCOME TO THE VOTING SYSTEM")
print("""\nThe voters are
1.Shivani
2.Srivarsha
3.Jeeva""")
global x
x=int(input("\nEnter the number of voters: "))
votes1=0
votes2=0
votes3=0
print("\n")
votingsystem()
Screenshot
CONCLUSION
Developing a simple voting system is an excellent way to apply core programming concepts such
as loops, conditionals, data storage, and user interaction. By following a structured approach with
a clear flowchart and algorithm, developers can build a system that efficiently handles user input,
validates data, and processes results.
This project not only reinforces logical thinking and coding skills but also demonstrates how
programming can be used to solve real-world problems, like managing elections or surveys. With
further enhancements, such as incorporating databases, graphical interfaces, or web
functionality, this system can evolve into a robust application suitable for various scales.
In conclusion, a voting system is a practical and rewarding project that showcases the importance
of careful planning, logical design, and accurate implementation in software development.
REFERENCES
Application:
ChatGPT: ChatGPT is an AI language model that generates to assist with tasks and conversations.
Official Documentation:
Python Official Documentation