Computer Science Project
Computer Science Project
Computer Science Project
1.ABSTRACT
2.SYSTEM CONFIGURATION
3. INTRODUCTION
* PYTHON
4. SOUCE CODE
5.OUTPUT (SCREENSHOT)
6.BIBILIOGRAPHY
ABSTRACT:
This project focuses on the development of a collection of
games within a Python program, leveraging the
capabilities of a user-defined module. The objective is to
create an interactive and entertaining platform where
users can access various games seamlessly. Each game
module is designed to adhere to a standardized
interface, facilitating easy integration and maintenance.
The user-defined module serves as a centralized
repository for game logic, providing flexibility for adding
new games and modifying existing ones. Through this
project, we explore the implementation of diverse
gaming experiences while emphasizing code modularity
and reusability within the Python ecosystem
SYSTEM CONFIGURATION:
Device name DESKTOP-0JU5DCK
Processor AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx 2.00 GHz
Device ID D4237F4C-E0C1-4C54-8263-9D413670412D
Product ID 00331-10000-00001-AA054
Pen and touch No pen or touch input is available for this display
Version 22H2
Installed on 10-05-2022
OS build 19045.4651
INTRODUCTION:
PYTHON INTRODUCTION:
Python is a high level. iterpreted scripting language
devekoped in the tate I1980, by (auido van Rossum
at the National Research Istitute for Mathematics and
Computer Science in the Netherlands. The initial
version was published at he all sources newsgroup in
1991, and version I.0 was released in 1994.,
Python 2.0 was released in 2000, and the 2.x versions
were the prevalent releases until December 200%.
A that timne, the development team made the decision
to release version 3.0, which contained a few
relatively small but significant changes that were not
backward compatible with the 2.x versions. Python
2 and 3 are very similar, and some features of Python 3
have been backported to Python 2. Butin general.
they remain not quite compatible.
Both Python 2 and 3 have continued o be maintained and
developed, with periodic release updates for
both. As of this writing, the most recent versions
available are 2.7.15 and 3.6.5. However, an official
End of life of January 1,2020 has been established for
Python 2, after which time it will no longer be
maintained. If you are a newcomer to Python, it is
recommended that you focus on Python 3, as this
tutorial will do.
Python is still maintained by a core development team at
the Institute, and Guido is still in charge,
having been given the title of BDFL (Benevolent Dictator
For Life) by the Python community. The
name Python, by the way, derives not from the sriake,
but from the British comedy troupe Monty
Python's Flying Circus, of which Guido was, and
presumably still is, a fan. It is common to find
references to Monty Python sketches and movies
scattered throughout the Python documentation.
Python is Popular:
Python has been growing in popularity over the last few
years. The 2018 Stack Overflow Developer
Survey ranked Python as the 7th most popular and the
number one most wanted technology of the year.
World-class software development countries around the
globe use Python every single day. According
to research by Dice Python is also one of the hottest
skills to have and the most popular programming
language in the world based on the Popularity of
programming Language Index.
Python is Interpreted:
Many languages are compiled, meaning the source code
you create needs to be translated into machine
code, the language of your computer's processor, before
it can be run. Programs written in an
interpreted language are passed straight to an
interpreter that runs them directly.
This makes for a quicker development cycle because you
just type in your code and run it. withoutthe
intermediate compilation step.
Sorce code:
import random
def rock():
c= ['rock', 'paper', 'scissors']
while True:
if player == 'quit':
break
if player in c:
opponent = random.choice(c)
print(f"Computer chooses {opponent}")
if player == opponent:
print(" tie!")
elif (player =='rock' and opponent =='scissors') or
(player =='paper' and opponent =='rock') or (player
=='scissors' and opponent =='paper'):
print("You win!")
else:
print("opponent wins!")
def oddoreven():
print("Welcome to Hand Cricket!")
print("Enter a number between 1 and 6 for each turn.")
player_score = 0
is_out = False
except ValueError:
print("Please enter a valid integer between 1 and
6.")
https://www.digitalocean.com/community/tutorials/python-wait-time-wait-for-input
https://pieriantraining.com/how-to-wait-for-a-keypress-i
https://www.geeksforgeeks.org/make-python-wait-for-a-pressed-
https://www.geeksforgeeks.org/how-to-make-a-python-program
https://blog.hubspot.com/website/python-input
THANK YOU