Uploaded by Shivansh

CS PROJECT

advertisement
LANCER’S CONVENT
SESSION-2023-2024
-------------------------------------------A PROJECT REPORT ON
CREATING A
STONE PAPER SCISSOR
GAME
---------------------------------------------
Teacher in charge
Ms. Rekha Mahajan
Submitted by
Shivansh Chhillar
XI – A
13000
TABLE OF CONTENTS
1. Certificate
2. Acknowledgement
3. Introduction to python
4. Project Synopsis
5. System Requirments
6. Code
7. Screen Shots Of Execution
8. Bibliography
9. Limitations
CERTIFICATE
This is to certify that _____________ of Class _____
of Lancer’s Convent has done his project on
03/01/2024 under my supervision. He has taken an
interest and has shown the most sincerity in the
completion of this project.
Ms. Rekha Mahajan
ACKNOWLEDGEMENT
It is with pleasure that I acknowledge my sincere
gratitude to our teacher, Ms.Rekha Mahajan who
taught and undertook the responsibility of teaching
the subject Computer Science. I have been greatly
benefited from her classes.
I am especially indebted to our Principal who has
always been a source of encouragement and support
and without his inspiration, this project would not
have been successful.
Finally, I would like to express my sincere toward’s
appreciation to all the other students in my batch for
their help and support in understanding coding and
helping practically in the lab.
(Signature)
Shivansh Chhillar
INTRODUCTION TO PYTHON
Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics. Its
high-level built-in data structures, combined with
dynamic typing and dynamic binding, make it very
attractive for Rapid Application Development, as well
as for use as a scripting or glue language to connect
existing components. Python’s simple, easy-to-learn
syntax emphasizes readability and
therefore reduces the cost of program maintenance.
Python supports modules and packages, which
encourages program modularity and code reuse. The
Python interpreter and the extensive standard library
are available in source or binary form without charge
for all major platforms and can be freely distributed.
History of Python
Python is a widely used general-purpose, high-level
programming language. It was initially designed by
Guido van Rossum in 1991 and developed by Python
Software Foundation. It was mainly developed for
emphasis on code readability, and its syntax allows
programmers to express concepts in fewer lines of code.
SYSTEM REQUIREMENTS
HARDWARE REQUIREMENT:
 Printer to print the required documents of the project
 Compact Drive
 Processor: Pentium III and above
 RAM: 256 MB(minimum)
 Hard-Disk : 20 GB(minimum)
SOFTWARE REQUIREMENT:
 Windows 7 or higher
 Python idle 3.8 or higher.
 Microsoft Word 2010 or higher for documentation.
PROJECT SYNOPSIS
Creating Stone Paper Scissors Game By Python Code
Team Members : Individual
Datatypes, Functions, Modules used:
random(), count, loop .................
Features:
This project consist of python code to create a stpne
paper scissors game
Menu:1. display menu
2. choose stone paper or scissors
3. quit
USE: Sample----change according to your project
1. Educational Purpose in Programming Classes:
 Learning Object-Oriented Programming (OOP): The Ludo game
program can serve as a practical example for students to understand
and implement concepts of object-oriented programming, including
classes, objects, and encapsulation.
 Control Structures: Students can practice using control structures
like loops and conditional statements to implement the game logic,
handle user input, and control the flow of the game.
 Random Number Generation: The use of the random module to
simulate dice rolls provides an opportunity to discuss the concept of
randomness and how to use Python libraries for such purposes.
2. Algorithmic Thinking:
 Game Logic: Implementing the game’s rules and logic involves
algorithmic thinking. Students can learn to design and implement
algorithms to handle player turns, dice rolls, and piece movements.
3. User Interaction and Input Handling:
 User Interface Design: While this simple console-based program
doesn’t have a graphical user interface (GUI), it introduces students
to user interaction and input handling. More advanced versions could
involve GUI development.
4. Teamwork and Collaboration:
 Group Projects: Students can work in teams to enhance and
expand the Ludo game. This
promotes collaboration, code integration, and version control
practices.
5. Problem-Solving Skills:
 Bug Fixing: Debugging the program and fixing any issues that
arise during development enhances problem-solving skills. Students
can learn to troubleshoot and improve code.
6. Recreation and Entertainment:
 Leisure Activity: Beyond educational purposes, the Ludo game
can be an entertaining project. Friends or family can enjoy playing
the game and have fun together.
DESCRIPTION:
This project aims at making a basic stone paper scissor
game using python.
The system includes a starting page.......
Creating a Ludo game using Python involves designing and implementing
the game’s logic, handling user input, and providing a way for players to
interact with the game Creating a Ludo game in Python involves
combining object-oriented programming principles, user input handling,
and random number generation. The project allows for educational
exploration of various programming concepts and can be expanded upon
with additional features or graphical interfaces for a more immersive
experience.
1. Project Structure:
•
•
Main Program File(cs project shivansh chhillar 11A): contains
main logic and menu driven interface
Stone paperscissors game: Defines method of game initialization,
choosing etc..........
2. Class:
•
•
•
Methods: for loop: runs number of times a user wants to run.
Random(): generates result from the computer
Count:counts how many times user and computer won.
3.Main Program:
• Game loop: A loop that continues until the user chooses to quit.
In each iteration, the program displays a menu with options for
choosing stone paper or scissor, and quitting.
• User Input Handling: Takes user input and calls the corresponding
method in the stone paper scissor class.
Checks for invalid input and prompts the user to enter a valid
option.
•
•
Random Module: Utilizes Python’s random module to simulate
computer choice , providing a random number between 1 and 3.
Testing: Incorporates testing for different scenarios, ensuring the
game functions as expected.
Handles edge cases and unexpected input gracefully.
SOURCE CODE
OUTPUT
BIBLIOGRAPHY
BooksReferred–
 NCERT Computer Science Textbook for Class 12
 Sumita Arora Textbook for Class 12
WebsitesSearched–
 www.github.com
 www.youtube.com
 www.geeksforgeeks.org
Download