Computer Science Investigatory Project
Computer Science Investigatory Project
Computer Science Investigatory Project
INVESTIGATORY PROJECT
ON
DEVELOPING A COLOR GAME
Using Python
AISSCE 2019-20
CENTRAL BOARD OF SECONDARY EDUCATION
Signature of Principal
ACKNOWLEDGEMENT
I, Jayaditya Dey, would like to thank our principal, Dr. B.K. Bhuyan,
who has inspired and encouraged us by his deeds and achievements, as
he always tells us what we do the best and be the best in it.
Jayaditya Dey
Class – XII (Science) A1
Roll No:
AIM OF THE PROJECT
DEVELOPING A
COLOR GAME
CONTENTS
Purpose
What is python?
Why python?
About the game and how it works
Modules/functions used in coding
Coding for the snake game
Output
Conclusion
Bibliography
PURPOSE
Game Development has emerged as an integral field in the sector of
technological advancement. Gamers and gaming professional are slowly
improving on this sector and every now and then new games are being
developed by such programmers.
For the ones who wish to make a career in this field, this small
project can be regarded as their first step.
The game has also provided me an avenue for eliminating stress once
in a while. It’s extremely simple and yet competitive. Trying to
beat my previous score pushes me toward typing quicker and thinking
faster.
WHAT IS PYHTON?
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
together. 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.
WHY PYHTON?
This game is a quick response time killer. Anyone can play it. It
attempts to trick the player into entering an incorrect input. The
goal is to enter as many correct inputs as possible within the given
time. The primary goal of the game is to break the previous record
for highest score.
There are ten available colors in this game; Red, Blue, Green, Pink,
Black, Yellow, Orange, White, Purple and Brown. The game window
displays one of the color names as text. Here comes the catch. The
text is formatted and displayed in another color (from the available
colors). The player must enter the name of the color with which the
text is formatter and not the name already on display. This demands
quick thinking and even faster typing. As soon as a player registers
the correct input, the name and color on display changes and a point
is scored.
The goal is to get as many points as possible within 30 seconds.
score += 1
random.shuffle(colours)
global timeleft
# if a game is in play
if timeleft > 0:
# Driver Code
timeLabel.pack()
OUTPUT
CONCLUSION
We learned how to create the color game in Python. Many things could
be added to this little toy game but this serves as a very simple
example.
The good thing about this game and our solution is that it is very
simple. The approach is pretty simple and easy to understand even for
beginners. This game could run on many platforms.
There can be many more features which can be added to this game to
make it more interactive and interesting.
BIBLIOGRAPHY
Books used:
Sumita Arora Computer text book for class XI
Sumita Arora Computer text book for class XII
Websites:
1. https://www.geeksforgeeks.org/introduction-to-pygame/
2. https://www.pythonforbeginners.com/random/how-to-use-the-random-module-in-python
3. https://www.geeksforgeeks.org/python-gui-tkinter/