Online Restaurant Management System
Online Restaurant Management System
Online Restaurant Management System
BUBT
Report On
Catch the Fruit
Conduct By:
Pias Miah 19201103054
Md Israfil Islam 19201103075
Md Alamin Shikder 19201103068
Asha Akter 19201103077
Advisor:
Ms. Humayra Ahmed
Lecturer
Department of Computer Science and Engineering
Bangladesh University of Business and Technology-BUBT
Declaration of Authorship
We, Pias Miah, Md Israfil Islam, Md Alamin Shikder, Asha Akter declare this
project “Catch The Fruit” and the work presented in it are our own. We confirm that.
This work was done mainly for B.Sc. Engineering in CSE degree at this university.
There any part of this project has been submitted for a qualification from this
university. We have acknowledged all main sources of help. We have consulted the
published work of others; this is always clearly attributed.
ii
Certificate
This is to certify that we are students of B.Sc. in CSE have completed the report work
titled “Catch The Fruit” satisfactory in partial for the requirement of B.Sc. in CSE
Bangladesh university of Business and Technology in the year 2022.
iii
Dedication
Dedicated to our loving parents and all honorable teachers for all their love and
inspiration.
iv
Abstract
This report is meant for describing all the features and procedures that were followed
while developing the project. This report specially mentions the details of the project
how it was developed, the primary requirement as well as various features and
functionalities of the project and the procedures followed in achieving these
objectives. This system helps in freshness our mind and can thus help in spend times.
“Catch The Fruit” using this we can calm our mind and brain.
v
Acknowledgements
First of all, we are thankful and expressing our gratitude to Almighty Allah gives us
blessing, patience, mental and physical strength to complete this project work. We are
deeply indebted to our project supervisor Ms. Humayra Ahmed, Lecturer,
Department of CSE, Bangladesh University of Business and Technology. His
scholarly guidance, important suggestions, work for going through our drafts and
correcting them, and generating courage from the beginning to the end of the research
work has made the completion of this thesis possible. A very special gratitude goes out
to all our friends for their support and help to implement our works. The discussions
on various topics of our works have been very helpful for us to enrich our knowledge
and conception regarding the work. Last but not the least; we are highly grateful to our
parents and family members for supporting us spiritually throughout writing this thesis
and our life in general.
vi
Approval
This project “Catch The Fruit'' submitted by Pias Miah (19201103054), Md Israfil Islam
(19201103075), Md Alamin Shikder (19201103064), Asha Akter (19201103077), Department of
Computer Science and Engineering, Bangladesh University of Business and Technology, under the
supervision of
Ms. Humayra Ahmed, Lecturer, Department of Computer Science and Engineering, has been
accepted as satisfactory for the partial fulfillment of the requirement for the degree of Bachelor of
Science (B.Sc.) in Computer Science and Engineering and approved as to its style and contents.
-------------------------------------------------------------
Supervisor:
Ms. Humayra Ahmed
Lecturer
Department of Computer Science and Engineering
Bangladesh University of Business and Technology-BUBT
--------------------------------------------------------------
Chairman:
Md. Saifur Rahman
Assistant Professor and Chairman
Department of Computer Science and Engineering
Bangladesh University of Business and Technology-BUBT
vii
Table of Contents
Chapter 1 Introduction...........................................................................................................9
3.2 Results.............................................................................................................................16
Chapter 4 Conclusion..........................................................................................................18
Chapter 5 References...........................................................................................................19
viii
Chapter 1
Introduction
1.1 Python Programming Language
Python is one of the many open source object oriented programming application software
available in the market. Python is developed by Guido van Rossum. Guido van Rossum started
implementing Python in 1989. Python is a very simple programming language so even if you are new
to programming, you can learn python without facing any issues. Some of the many uses of Python
are application development, implementation of automation testing process, allows multiple
programming build, fully constructed programming library, can be used in all the major
operating systems and platforms, database system accessibility, simple and readable code, easy
to apply on complex software development processes, aids in test driven software application
development approach, machine learning/ data analytics, helps pattern recognitions, supported
in multiple tools, permitted by many of the provisioned frameworks, etc.
3. Cross platform: Python is available and can run on various operating systems such as
Mac, Windows, Linux, Unix etc. This makes it a cross platform and portable language.
5. Large standard library: Python comes with a large standard library that has some
handy codes and functions which we can use while writing code in Python.
6. Free: Python is free to download and use. This means you can download it for free and
use it in your application. See: Open Source Python License. Python is an example of a
FLOSS (Free/Libre Open Source Software), which means you can freely distribute copies of
this software, read its source code and modify it.
7. Supports exception handling: If you are new, you may wonder what is an exception?
An exception is an event that can occur during program exception and can disrupt the
normal flow of program. Python supports exception handling which means we can write less
error prone code and can test various scenarios that can cause an exception later on.
8. Advanced features: Supports generators and list comprehensions. We will cover these
features later.
ix
1.2 Applications of Python
Python can be used to develop different applications like web applications, graphic user
interface based applications, software development application, scientific and numeric
applications, network programming, Games and 3D applications and other business
applications. It makes an interactive interface and easy development of applications. You
may be wondering what all are the applications of Python. There are so many applications of
Python, here are some of the them.
1. Web development–Web framework like Django and Flask are based on Python. They
help you write server side code which helps you manage database, write backend
programming logic, mapping urls etc.
3. Data Analysis–Data analysis and data visualisation in form of charts can also be developed
using Python.
7. Desktop applications–You can develop desktop application in Python using library like TK
inter or QT.
x
Chapter 2
System Requirements
2.1 Software Requirements
PyCharm2019.1.1 (Community Edition)
Build#PC-191.6605.12, built on April 3, 2019
JRE:11.0.2+9-b159.34amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
11
Chapter 3
Implementation and Results
3.1 About Project
This is a simple “Catch The Fruit” game using Python programming language. Beginners can
use this as a small project to boost their programming skills and understanding logic.
1. The “Catch The Fruit” program randomly selects a secret picture from a list of secret
picture. The random module will provide this ability, so line 1 in program imports it.
2. The Game: Here, a random picture (a fruit and something) is picked up from our
collection and the player gets limited chances to win the game.
3. When a picture in that picture is picked up, that picture position in the object is made
visible. In this way, all chocolate picture of pictures are to be guessed before all the
chances are over.
4. For convenience, we have given live 5 chances. For example, picture to be guessed is
mango, then user gets 100 point, as a picture is chocolate user loss his live.
class ScoreBoard():
def initGUI(self):
self.livesVar = IntVar()
Label(self.parent, text="Lives:", font=("Helvetica", 16,
"bold")).grid(row=1, column=2, padx=35, pady=100,
sticky=N + W)
Label(self.parent, textvariable=self.livesVar, font=("Helvetica", 16,
"bold")).grid(row=1, column=2, padx=60,
pady=150, sticky=N + W)
self.scoreVar = IntVar()
Label(self.parent, text="Score:", font=("Helvetica", 16,
"bold")).grid(row=1, column=2, padx=35, pady=250,
sticky=N + W)
12
Label(self.parent, textvariable=self.scoreVar, font=("Helvetica", 16,
"bold")).grid(row=1, column=2, padx=50,
pady=300, sticky=N + W)
self.highScoreVar = IntVar()
Label(self.parent, text="Highest Score:", font=("Helvetica", 16,
"bold")).grid(row=1, column=2, padx=0,
pady=400, sticky=N + W)
padx=50, pady=450,
sticky=N + W)
def reset(self):
self.lives = 5
self.score = 0
self.highScore = self.loadScore()
self.livesVar.set(self.lives)
self.scoreVar.set(self.score)
self.highScoreVar.set(self.highScore)
def loadScore(self):
with open("high-score.txt", "r") as data:
return int(data.read())
def saveScore(self):
if self.score > self.highScore:
with open("high-score.txt", "w") as data:
data.write(str(self.score))
def gameOver(self):
self.saveScore()
tkinter.messagebox.showinfo("", "U Ju5t lost ur live !")
if tkinter.messagebox.askyesno("", "Pl4y Ag41n ?"):
self.reset()
else:
exit()
class ItemsFallingFromSky():
13
self.player = player
self.board = board
self.fallSpeed = 50
self.xPosition = randint(50, 750)
self.isgood = randint(0, 1)
if self.isgood:
self.itemPhoto =
tkinter.PhotoImage(file="images/{}".format(choice(self.goodItems)))
self.fallItem = self.canvas.create_image((self.xPosition, 50),
image=self.itemPhoto, tag="good")
else:
self.itemPhoto =
tkinter.PhotoImage(file="images/{}".format(choice(self.badItems)))
self.fallItem = self.canvas.create_image((self.xPosition, 50),
image=self.itemPhoto, tag="bad")
self.move_object()
def move_object(self):
self.canvas.move(self.fallItem, 0, 15)
def check_touching(self):
x0, y0 = self.canvas.coords(self.fallItem)
x1, y1 = x0 + 50, y0 + 50
14
self.parent.geometry("1024x650")
self.parent.title("Hello Jerry?")
self.playerPhoto =
tkinter.PhotoImage(file="images/{}".format("jew.gif.png"))
self.playerChar = self.canvas.create_image((275, 533),
image=self.playerPhoto, tag="player")
self.personalboard = ScoreBoard(self.parent)
self.createEnemies()
def createEnemies(self):
ItemsFallingFromSky(self.parent, self.canvas, self.playerChar,
self.personalboard)
self.parent.after(1100, self.createEnemies)
if __name__ == "__main__":
root = Tk()
TheGame(root)
root.mainloop()
15
3.3 Result
16
17
Chapter 4
Conclusion
In the conclusion of this project, “Catch The Fruit” is a traditional game, typically
played with pictures. Catch the fruit in the python is a simple game. The project file
contains image files and python scripts. GUI uses the pygame library. Talking about
the gameplay, it’s a simple single player platformer game, where the player has to
collect all the candies in order to win the game. The main objective of this game is to
take as many fruits as you can. This game is inspired by the 90s famous game “fruit-
ninja”.
A simple and clean GUI is provided for easy gameplay. The gameplay design is so
simple that the user won’t find it difficult to use and understand. Different images are
used in the development of this game project, the gaming environment is just like
the fruit ninja game.
18
Chapter 5
References
https://www.upgrad.com/blog/python-game-projects-topics/
https://data-flair.training/blogs/python-project-ideas/"
https://www.freecodecamp.org/news/python-projects-for-beginners/
https://www.askpython.com/python/examples/easy-games-in-python
https://realpython.com/tutorials/gamedev/
https://www.youtube.com/watch?v=bgQKvWbdYdU
https://code-projects.org/catch-the-fruit-in-python-with-source-code/
https://data-flair.training/blogs/fruit-ninja-game-python/
19