0% found this document useful (0 votes)
13 views13 pages

Pps Project

The document presents a case study report on a simple voting system developed using Python by students from SRM Institute of Science and Technology. It outlines the project's objectives, system specifications, and methodology, including vote collection, validation, and result calculation. The report emphasizes the importance of programming concepts and the potential for future enhancements to the system.

Uploaded by

speechutopia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views13 pages

Pps Project

The document presents a case study report on a simple voting system developed using Python by students from SRM Institute of Science and Technology. It outlines the project's objectives, system specifications, and methodology, including vote collection, validation, and result calculation. The report emphasizes the importance of programming concepts and the potential for future enhancements to the system.

Uploaded by

speechutopia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

SIMPLE VOTING SYSTEM

21CSS101J- PROGRAMMING FOR PROBLEM SOLVING


A CASE STUDY REPORT

Submitted by

NANDA SHREE RA2411042020043


SUGU PRIYA S RA2411042020055
VANI BEDIA RA2411042020008

I SEMESTER/ I YEAR

COMPUTER SCIENCE AND ENGINEERING


With Specialization in Business Systems

FACULTY OF ENGINEERING AND TECHNOLOGY

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY


RAMAPURAM, CHENNAI
NOVEMBER 2024
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
(Deemed to be University U/S 3 of UGC Act, 1956)

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

S.No Content Page No

1 Introduction

2 Problem statement

3 System Specification
2.1 Hardware Specification
2.2 Software Specification
4 Flow Diagram / Architecture Diagram
(Flowchart/algorithm)

5 Explanation of the working methodology

6 Source code

7 Output

8 Conclusion

9 References
INTRODUCTION OF THE PROJECT

A voting system is an essential component of any democratic process, enabling individuals to


express their choice among various candidates or options. The concept of a simple voting system
allows for efficient collection and tallying of votes, and can be implemented in a variety of
environments. In this project, we aim to design a simple voting system using Python that enables
users to cast votes for a list of candidates, tracks the votes, and announces the results after all
votes are cast. The system will be designed for simplicity and ease of use, focusing on
functionality like vote collection, validation, and results calculation.
PROBLEM STATEMENT

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")

for i in range (1,x+1):


z=int(input("Choose one canditate for Voter{0}: ".format(i)))
if z==1:
votes1=votes1+1
elif z==2:
votes2=votes2+1
elif z==3:
votes3=votes3+1
else:
print("""\nInvalid input
Try again\n""")
votingsystem()

print("""\nThe total number of votes are


Shivani: {0}
Srivarsha: {1}
Jeeva: {2}\n""".format(votes1,votes2,votes3))

if votes1>votes2 and votes1>votes3:


print("Winner: Shivani")
elif votes2>votes1 and votes2>votes3:
print("Winner: Srivarsha")
elif votes3>votes1 and votes3>votes2:
print("Winner: Jeeva")
elif votes1==votes2!=0 :
print("It's a tie")
while True:
break
elif votes2==votes3!=0 :
print("It's a tie")
while True:
break
elif votes1==votes3!=0 :
print("It's a tie")
while True:
break
elif votes1==votes2==votes3!=0 :
print("It's a tie")
while True:
break
else:
print("Invalid input")

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.

Online Programming Site:


Programiz - Beginner-friendly resources for programming languages like Python, Java, and C++.

Official Documentation:
Python Official Documentation

You might also like