ROCK PAPER AND SCISSORS
A Project Report
Submitted in partial fulfillment for the award of the degree
of
Bachelor of Technology
IN
Metallurgical and Materials Engineering
by
M. VIKAS 24261A1824
V.V. DHANUNJAYA REDDY 24261A1838
Under the guidance of
M.Navya, ASSISTANT PROFESSOR
Department of Computer Science & Engineering
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Mahatma Gandhi Institute of Technology,
Gandipet, Hyderabad, Telangana.
1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
WE, M.Vikas and V.V.Dhanunjaya Reddy bearing hall ticket number, 24261A1824 ,24251A1838
hereby declare that the project report entitled
under the guidance of Dr.M.Navya,ASSISTANT PROFESSOR, Department of Computer
Science & Engineering, MGIT, Hyderabad, is submitted in partial fulfillment of the requirement
for qualifying the project work course during the academic year 2024-2025.
Project Coordinator Head of the Department
Dr.M.Navya Dr.K.Ramanjaeyulu
Dept of C.S.E Dept of M.M.E
2
ACKNOWLEDGEMENT
I extend my sincere and heartfelt thanks to our esteemed faculty, Dr.M.Navya, Assistant
Professor and for his exemplary guidance, monitoring and constant encouragement throughout
the course at crucial junctures and for showing us the right way.
I am grateful to respected coordinator Dr.M.Navya, Assistant Professor
for permitting me to utilize all the necessary facilities of the Institute.
I would like to extend thanks to our respected Head of the department, Dr.K.Ramanjaeyulu
Professor for allowing us to use the facilities available. We would like to thank other faculty
members also.
Last but not the least, I would like to thank our friends and family for the support and
encouragement they have given us during the course of our work.
M. VIKAS 24261A1824
V.V. DHANUNJAYA REDDY 24261A1838
3
ABSTRACT
The "Rock, Paper, Scissors" project is a simple Python-based game designed for beginners to understand
basic programming concepts such as user input, control flow, conditionals, and randomization. The game
allows the user to play against the computer, where both select one of the three options: rock, paper, or
scissors. The winner is determined based on the traditional rules of the game — rock beats scissors,
scissors beat paper, and paper beats rock.
The computer's choice is generated randomly using Python's random module, while the user's choice is
taken via keyboard input. The game includes logic to check for a tie, user win, or computer win. The
simplicity of the project makes it ideal for learning core concepts such as loops, conditional statements,
and importing modules. This project also serves as a foundation for building more advanced games or
interactive applications.
In conclusion, the Rock, Paper, Scissors game demonstrates the use of fundamental Python programming
constructs in a fun and engaging way, making it an excellent beginner-level project.
TABLE OF CONTENTS
4
TITLE PAGE NO
INTRODUCTION 6
ALGORITHM 7-8
CODE 9
RESULTS 10
CONCLUSION 11
REFERENCES 12
5
INTRODUCTION
In the digital world, passwords play a critical role in protecting personal data, online
accounts, and confidential information. With increasing threats like hacking and
identity theft, it is important to use strong and unpredictable passwords. However,
manually creating such passwords can be difficult and time-consuming.
This project aims to solve that problem by developing a simple password generator using
Python. The program allows users to generate secure passwords of any desired length
using a random combination of letters, numbers, and special characters. By using
Python’s built-in libraries such as random and string, the program ensures that each
generated password is unique, strong, and difficult to guess.
The project also helps students understand basic programming concepts such as functions,
loops, user input, and string operations while applying them to a practical and useful
application.
ALGORITHM
1. Start
2. Import the random module
→ Required to randomly select the computer’s choice.
6
3. Define a list of choices
→ choices = ['rock', 'paper', 'scissors']
4. Prompt the user to input their choice (rock, paper, or scissors)
→ Convert the input to lowercase to avoid case mismatch.
5. Generate the computer's choice randomly using random.choice() on the list.
6. Display the computer's choice to the user.
7. Compare the user's choice and the computer's choice:
If both are the same → Display "It's a tie!"
Else if:
User = rock and Computer = scissors → User wins
User = paper and Computer = rock → User wins
User = scissors and Computer = paper → User wins
Else → Computer wins (User loses)
8. Display the result based on the comparison.
7
9. End
CODE:-
import random
choices = ['rock', 'paper', 'scissors']
user = input("Choose rock, paper, or scissors: ").lower()
computer = random.choice(choices)
print("Computer chose:", computer)
if user == computer:
print("It's a tie!")
elif (user == 'rock' and computer == 'scissors') or \
(user == 'paper' and computer == 'rock') or \
(user == 'scissors' and computer == 'paper'):
print("You win!")
else:
print("You lose!")
8
RESULTS
9
CONCLUSION
The Rock, Paper, Scissors game project successfully demonstrates how fundamental Python programming
concepts can be applied to create a simple, interactive game. Through this project, we have implemented core
features such as user input handling, conditional logic, random number generation, and looping structures.
The game allows the user to play against the computer by choosing one of the three options: rock, paper, or
scissors. The winner is determined based on classic game rules. This project not only improves logical
thinking but also enhances the ability to structure and organize code using functions and control flow.
Overall, this project serves as a strong foundation for beginners to learn and practice Python. It can also be
expanded further by adding new features such as score tracking, a graphical user interface (GUI), or
multiplayer capabilities.
REFERENCES
1. https://www.geeksforgeeks.org
2. https://github.com/
10