You are on page 1of 39

A

MAJOR PROJECT REPORT

ON

RECOMMENDATION OF INDIAN CUISINE RECIPES BASED ON


INGREDIENTS
dissertation submitted to
Jawaharlal Nehru Technological University, Hyderabad
In partial fulfillment of the requirement for the award of the degree of

BACHELOR OF TECHNOLOGY
In

COMPUTER SCIENCE AND ENGINEERING

Submitted by

MIRZA IBRAHIM BAIG (16M21A0525)


SYED OWAIS ALI (16M21A0556)
UZAIR MOHAMMED AZAM (16M21A05B9)
KHAJA AMEENUDDIN GHORI (16M21A0517)
MOBALLIGH UL ISLAM (16M21A0527)
Under The Guidance Of

Mr. SYED AHMEDUDDIN


Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


LORDS INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Approved by AICTE-New Delhi and Accredited by NAAC ‘A’ grade. Affiliated to JNTU-HYD)
2020-2021
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
LORDS INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Approved by AICTE-New Delhi and Accredited by NAAC ‘A’ grade. Affiliated to JNTU-HYD)

CERTIFICATE

This is to certify that the major project work entitled “RECOMMENDATION OF


INDIAN CUISINE RECIPES BASED ON INGREDIENTS” is submitted by MIRZA
IBRAHIM BAIG (16M21A0525), SYED OWAIS ALI (16M21A0556), UZAIR
MOHAMMED AZAM (16M21A05B9) , KHAJA AMEENUDDIN GHORI
(16M21A0517) and MOBALLIGH UL ISLAM (16M21A0527) in partial fulfillment for the
award of degree of Bachelor of Technology In “Computer Science and Engineering” of
Jawaharlal Nehru Technological University, Hyderabad during the academic year 2020-2021.
The project report has been approved as it satisfies the academic requirements in report of
project work prescribed for the Bachelor of Technology. The result embodied in this project
report has not been submitted either in partial or in full, for the award of any other degree in
this institute or any institute or university.

Mr. Syed Ahmeduddin Dr. T.K Shaik Shavali


PROJECT GUIDE HEAD OF THE DEPARTMENT

PRINCIPAL EXTERNAL EXAMINER


DECLARATION

We hereby declare that the project report entitled “RECOMMENDATION OF


INDIAN CUISINE RECEIPES BASED ON INGREDIENTS” is submitted in partial
fulfillment of the requirement for the award of the degree of Bachelor of Technology in
“Computer Science And Engineering” in the Lords Institute Of Engineering and
Technology, affiliated to Jawaharlal Nehru Technology University, Hyderabad, is a record
of Bona fide project work carried out by us under the guidance of Mr. Syed Ahmeduddin.

We further declare that the work reported in this project and the result embodied in this
project report has not been submitted either in partial or in full, for the award of any other
degree in this institute or any institute or university.

MIRZA IBRAHIM BAIG (16M21A0525)


SYED OWAIS ALI (16M21A0556)
UZAIR MOHAMMED AZAM (16M21A05B9)
KHAJA AMEENUDDIN GHORI (16M21A0517)
MOBALLIGH UL ISLAM (16M21A0527)

DATE:
PLACE: HYDERABAD
ACKNOWLEDGEMENT

While developing the project and thesis preparation we were helped by many people.
We avail this opportunity to express our profound sense of gratitude to all who rendered their
valuable help and time in the completion of project on time with quality.

We would like to express our immense gratitude and sincere thanks to Management of
Lords Institute of Engineering and Technology for providing infrastructure necessary
equipment, support and excellent academic environment which was required during research
and development of the project.

We are thankful to DR. C.V.NARSIMHULU, the Principal of Lords Institute of


Engineering and Technology for providing the necessary guidance to pursue and successfully
complete the project on time with quality.

We are mostly obliged and grateful to the DR.T.K SHAIK SHAVALI, Head of the
Department, Computer Science And Engineering, Lords Institute of Engineering and
Technology, Hyderabad for his valuable guidance, keen and sustained interest and
encouragement throughout the implementation of this project.

We wish our deepest sense of gratitude to internal guide Mr. SYED AHMEDUDDIN,
Assistant Professor, Lords Institute of Engineering and Technology for his valuable advice and
guidance in the critical review, project implementation and thesis preparation.

We express our gratitude to all the other faculty members of CSE Department who
helped us in learning, implementing and project execution.

Finally, we acknowledge with gratitude the unflagging support and patience of our
parents for the guidance and encouragement during this project work.

MIRZA IBRAHIM BAIG (16M21A0525)


SYED OWAIS ALI (16M21A0556)
UZAIR MOHAMMED AZAM (16M21A05B9)
KHAJA AMEENUDDIN GHORI (16M21A0517)
MOBALLIGH UL ISLAM (16M21A0527)

iv
ABSTRACT

There are lots of varieties of Indian cuisine available with same ingredients. In India,
Traditional cuisines consist of wide varieties due to locally available spices, herbs,
vegetables, and fruits. In this paper, we purposed a method that recommends recipes of
Indian cuisine on the basis of available ingredients and liked cuisine. For this work, we did
web scraping to make a collection of recipes' varieties and after that apply the content-based
approach of machine learning to recommend the recipes. This system gives the
recommendation of Indian Cuisines based on ingredients. Recipe Recommendation System
for Indian cuisines is a system that learns from the past preferences of a user’s preferred
dishes to recommend him/her new, untested cuisines. The basis of recommendation are the
ingredients in the recipes already liked by the user.

v
INDEX

Contents Page No.

1: INTRODUCTION 09

2: LITERATURE SURVEY 10

3: SYSTEM ANALYSIS 11

EXISTING SYSTEM 11

PROPOSED SYSTEM 12

SYSTEM REQUIREMENTS 13

4: PYTHON 14

HISTORY OF PYTHON 14

FEATURES OF PYTHON 15

LOCAL ENVIRONMENT SETUP 16

SETTING UP PATH IN WINDOWS 18

5: GRAPHICAL USER INTERFACE (GUI) 19

6: INTEGRATED DEVELOPMENT LEARNING ENVIRONMENT (IDLE) 20

7: SQLITE 22

MODULE FUNCTIONS AND CONSTANTS 23

8: SAMPLE CODE 25

9: OUTPUT

CREATING AN ACCOUNT 30

DEPOSITING MONEY IN ACCOUNT 31

WITHDRAW AMOUNT/ BALANCE INQUIRY 32

vi
ALL ACCOUNT HOLDER LIST 33

10: CONCLUSION 34

11: BIBLOGRAPHY 35

vii
BANK MANAGEMENT SYSTEM USING
PYTHON
CHAPTER-1
INTRODUCTION

Bank Management System project is written in Python. The project file contains a python script (main.py) and a
database file. This is a simple console based system which is very easy to understand and use. Talking about the
system, it contains all the basic functions which include creating a new account, view account holders record,
withdraws and deposit amount, balance inquiry, closing an account and edit account details. In this mini project,
there is no such login system. This means he/she can use all those available features easily without any restriction.
It is too easy to use, he/she can check the total bank account records easily.

Talking about the features of the Bank Management System, a user can create an account by providing the name of
the account holder, number, selecting amount type (Saving account or Current account) and providing an initial
amount more than or equal to 500. Then the user can also deposit and withdraw money just by providing his/her
account and entering the amount. For certain purpose, he/she can also check for the balance inquiry which displays
the account number and amount. He/she can also view all the account holder’s list. Another feature is that he/she
can modify their account detail and type if they want to.

This simple console based Bank Management system provides the simplest management of bank account and
transaction. In short, this projects mainly focus on CRUD. There’s an external database connection file used in this
mini project to save user’s data permanently.

In order to run the project, you must have installed Python, on your PC. This is a simple Console Based system,
specially written for the beginners.

9
CHAPTER-2

LITERATURE SURVEY

Information and communication technology (ICT) has helped to drive increasingly intense global Competition.
In the world history the most of the countries are most developed because of they are financially very clear for
how to use the high amount of money in the developing process in own country . We also use the SOA
architecture for providing the scalable and reliable service therefor we studied related to the SOA architecture to
know how we use to implementation process in our project using Service Oriented Architectures (SOA).we also
refer the paper who give the case study information about Scandinavian bank and a Swiss bank This two banks
are working on the basis of service oriented architecture for providing the service for the customer. SOA
provides potential for greater organizational agility (and thereby competitiveness). In the second paper we learn
which type of problems are created in banking system during the different types of transactions. Here discuss
about if any region the transaction may be fail then how to avoid it and fixed it. We also studied about Firms in
Italy defaulted more against banks with high levels of past losses. This `selective' default increases where legal
enforcement is weak. Poor enforcement thus can create a systematic transaction risk by encouraging banking
users to defaulted masse once the continuation value of their bank relationships comes into doubt. In banking
sector the security also must and when we talk about money or property this case is more sensational then we
found the security is the major thing to do in banking system.
CHAPTER-3
SYSTEM ANALYSIS

The project involved analyzing the design of few applications so as to make the application more users
friendly. To do so, it was really important to keep the navigations from one screen to the other well ordered and at
the same time reducing the amount of typing the user needs to do. In order to make the application more
accessible, the browser version had to be chosen so that it is compatible with most of the Browsers

EXISTING SYSTEM

The main object of this system is to provide a secure system. Our system is password protected and it only allows
authorized user to access various functions available in the system.

Our system will help the user to Locate any A/C wanted by the user.  It will Reduced manual work as most of the
work done by computer. As all the manual work will be done automatically so it will increase work speed and
reduce time consumption to complete any bank related work. It will also increase the work efficiency as few
employees can handle more customers.  This will reduced the manual workload and give information instantly.
The Project Banking system has been made to automate the Banking system. Through this bank management
system user can manage all bank account activity like deposit money, withdraw money, transfer money from one
account to another account, online payment etc. Using this bank management system user can check his account
detail online like balance in account, bank statement etc.  The Administrator can check bank account with a login
can work out with A/C holders of the bank can withdraw/ deposit cash /  cheque  /DD to/from their accounts. This
system is also help bank user to create New account easily. The project makes a sincere effort to provide all the
below-mentioned features to meet the requirements of the bank.

In this project we have automate the bank process like Account Opening, Daily Transactions, Loan Sanctions,
Account Maintenance. In this bank management system use can also search record of a particular Account Holder.
PROPOSED SYSTEM

The main objective of the system is to automate all the banking process  with improved performance an realize the
vision of paperless banking. Salient features of the proposed bank management system is given below.

Using this bank management system any information can be easily searched. User can view all the details of the
customer.

Using this system user can create new customer account and maintain its data efficiently and effectively. All
records of account and customer are stored in separate files. Which are maintained constantly update by system.

Manage large number of customer details with ease. Particular A/c information can be modified A particular
customer record can be modified for one or more field’s customer name, address by providing A/c number.

Create a statistical report to facilitate the finance department work. Activities like updating, modification, deletion
of records should be easier. A customer record can be easily deleted by authorize user by providing A/c number.

The proposed system provides faster data access, data entry and retrieval.

The proposed system is more efficient, fast, reliable, user friendly. Over and above the proposed system does not
have any possibility of data loss during processing.
CHAPTER-4
SYSTEM REQUIREMENTS

HARDWARE REQUIREMENTS:

 System : Pentium Dual Core.


 Hard Disk : 500 GB.
 Monitor : 15’’ LED
 Input Devices : Keyboard, Mouse
 Ram : 1GB.

SOFTWARE REQUIREMENTS:

 Operating system : Windows 10.


 Coding Language : Python
 Tool : Python IDLE, Command Prompt
 Database : MYSQL

Technologies and Languages used to Develop:

 Python

Debugger and Emulator:

 Any Browser (Particularly Chrome)


CHAPTER-5

SYSTEM DESIGN

 Design is the first step into the development phase for any engineered product or
system.
 Design is a creative process. A good design is the key to effective system. The term “design” is
defined as “the process of applying various techniques and principles for the purpose of defining a
process or a system in sufficient detail to permit its physical realization”. It may be defined as a
process of applying various techniques and principles for the purpose of defining a device, a process
or a system in sufficient detail to permit its physical realization.
 Software design sits at the technical kernel of the software engineering process and is applied
regardless of the development paradigm that is used.
 The system design develops the architectural detail required to build a system or product. As in the
case of any systematic approach, this software too has undergone the best possible design phase fine
tuning all efficiency, performance and accuracy levels.
 The design phase is a transition from a user oriented document to a document to the programmers or
database personnel. System
CHAPTER-6

MODULE DESIGN
The design of the module focuses on controlling the amount of input required, controlling the errors,
avoiding delay, avoiding extra steps and keeping the process simple. The input is designed in such a way so
that it provides security and ease of use with retaining the privacy.
CHAPTER-7

PYTHON
Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to
be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has
fewer syntactical constructions than other languages.

 Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.

 Python is Interactive − You can actually sit at a Python prompt and interact with the interpreter
directly to write your programs.

 Python is Object-Oriented − Python supports Object-Oriented style or technique of programming


that encapsulates code within objects.

 Python is a Beginner's Language − Python is a great language for the beginner-level programmers
and supports the development of a wide range of applications from simple text processing to WWW browsers
to games.

History of Python:

Python was developed by Guido van Rossum in the late eighties and early nineties at the National Research
Institute for Mathematics and Computer Science in the Netherlands.

Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68, SmallTalk, and
Unix shell and other scripting languages.

Python is copyrighted. Like Perl, Python source code is now available under the GNU General Public License
(GPL).

Python is now maintained by a core development team at the institute, although Guido van Rossum still holds a
vital role in directing its progress.

Python Features:

Python's features include:


 Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This
allows the student to pick up the language quickly.

 Easy-to-read − Python code is more clearly defined and visible to the eyes.

 Easy-to-maintain − Python's source code is fairly easy-to-maintain.

 A broad standard library − Python's bulk of the library is very portable and cross-platform
compatible on UNIX, Windows, and Macintosh.

 Interactive Mode − Python has support for an interactive mode which allows interactive testing and
debugging of snippets of code.

 Portable − Python can run on a wide variety of hardware platforms and has the same interface on all
platforms.

 Extendable − You can add low-level modules to the Python interpreter. These modules enable
programmers to add to or customize their tools to be more efficient.

 Databases − Python provides interfaces to all major commercial databases.

 GUI Programming − Python supports GUI applications that can be created and ported to many
system calls, libraries and windows systems, such as Windows MFC, Macintosh, and the X Window system of
Unix.

 Scalable − Python provides a better structure and support for large programs than shell scripting.

Apart from the above-mentioned features, Python has a big list of good features, few are listed below −

 It supports functional and structured programming methods as well as OOP.

 It can be used as a scripting language or can be compiled to byte-code for building large
applications.

 It provides very high-level dynamic data types and supports dynamic type checking.

 It supports automatic garbage collection.

 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.

Python is available on a wide variety of platforms including Linux and Mac OS X. Let's understand how to set
up our Python environment.
Local Environment Setup:

Open a terminal window and type "python" to find out if it is already installed and which version is installed.

 Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX, etc.)

 Win 9x/NT/2000

 Macintosh (Intel, PPC, 68K)

 OS/2

 DOS (multiple versions)

 PalmOS

 Nokia mobile phones

 Windows CE

 Acorn/RISC OS

 BeOS

 Amiga

 VMS/OpenVMS

 QNX

 VxWorks

 Psion

 Python has also been ported to the Java and .NET virtual machines

Getting Python:

The most up-to-date and current source code, binaries, documentation, news, etc., is available on the official
website of Python https://www.python.org/

You can download Python documentation from https://www.python.org/doc/. The documentation is available


in HTML, PDF, and PostScript formats.
Installing Python:

Python distribution is available for a wide variety of platforms. You need to download only the binary code
applicable for your platform and install Python.

If the binary code for your platform is not available, you need a C compiler to compile the source code
manually. Compiling the source code offers more flexibility in terms of choice of features that you require in
your installation.

Here is a quick overview of installing Python on various platforms

Windows Installation:

Here are the steps to install Python on Windows machine.

 Open a Web browser and go to https://www.python.org/downloads/.

 Follow the link for the Windows installer python-XYZ.msi file where XYZ is the version you need to
install.

 To use this installer python-XYZ.msi, the Windows system must support Microsoft Installer 2.0. Save
the installer file to your local machine and then run it to find out if your machine supports MSI.

 Run the downloaded file. This brings up the Python install wizard, which is really easy to use. Just
accept the default settings, wait until the install is finished, and you are done.

Setting up PATH:
Programs and other executable files can be in many directories, so operating systems provide a search path that
lists the directories that the OS searches for executables.

The path is stored in an environment variable, which is a named string maintained by the operating system.
This variable contains information available to the command shell and other programs.
The path variable is named as PATH in Unix or Path in Windows (Unix is case sensitive; Windows is not).

In Mac OS, the installer handles the path details. To invoke the Python interpreter from any particular
directory, you must add the Python directory to your path.

Setting path at Windows:

To add the Python directory to the path for a particular session in Windows −
At the command prompt − type path %path%;C:\Python and press Enter.
Note − C:\Python is the path of the Python directory
CHAPTER-8

GRAPHICAL USER INTERFACE

A GUI (graphical user interface) is a system of interactive visual components for


computer software. A GUI displays objects that convey information, and represent actions that
can be taken by the user. The objects change color, size, or visibility when the user interacts
with them.
GUI objects include icons, cursors, and buttons. These graphical elements are sometimes
enhanced with sounds, or visual effects like transparency and drop shadows.

A GUI is considered to be more user-friendly than a text-based command-line interface, such


as MS-DOS, or the shell of Unix-like operating systems.

The GUI was first developed at Xerox PARC by Alan Kay, Douglas Engelbart, and a group of
other researchers in 1981. Later, Apple introduced the Lisa computer with a GUI on January
19, 1983.

How do you pronounce: GUI is pronounced by saying each letter (G-U-I). It


sometimes is also pronounced as "gooey."
CHAPTER-9

INTEGRATED DEVELOPMENT LEARNING ENVIRONMENT

Every Python installation comes with an Integrated Development and Learning Environment, which you’ll
see shortened to IDLE or even IDE. These are a class of applications that help you write code more efficiently.
While there are many IDEs for you to choose from, Python IDLE is very bare-bones, which makes it the
perfect tool for a beginning programmer.

Python IDLE comes included in Python installations on Windows and Mac. If you’re a Linux user, then you
should be able to find and download Python IDLE using your package manager. Once you’ve installed it, you
can then use Python IDLE as an interactive interpreter or as a file editor.

An Interactive Interpreter:

The best place to experiment with Python code is in the interactive interpreter, otherwise known as a shell. The
shell is a basic Read-Eval-Print Loop (REPL). It reads a Python statement, evaluates the result of that statement,
and then prints the result on the screen. Then, it loops back to read the next statement.

The Python shell is an excellent place to experiment with small code snippets. You can access it through the
terminal or command line app on your machine. You can simplify your workflow with Python IDLE, which
will immediately start a Python shell when you open it.

How to Use the Python IDLE Shell:


The shell is the default mode of operation for Python IDLE. When you click on the icon to open the program,
the shell is the first thing that you see:
This is a blank Python interpreter window. You can use it to start interacting with Python immediately. You can
test it out with a short line of code:

Here, you used print() to output the string "Hello, from IDLE!" to your screen. This is the most basic way to
interact with Python IDLE. You type in commands one at a time and Python responds with the result of each
command.
CHAPTER -10

SQLITE3
SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server
process and allows accessing the database using a nonstandard variant of the SQL query language. Some
applications can use SQLite for internal data storage. It’s also possible to prototype an application using SQLite
and then port the code to a larger database such as PostgreSQL or Oracle.

The sqlite3 module was written by Gerhard Häring. It provides a SQL interface compliant with the DB-API 2.0
specification described by PEP 249.

Module functions and constants:

sqlite3.version
The version number of this module, as a string. This is not the version of the SQLite library.

sqlite3.version_info
The version number of this module, as a tuple of integers. This is not the version of the SQLite library.

sqlite3.sqlite_version

The version number of the run-time SQLite library, as a string.

sqlite3.sqlite_version_info
The version number of the run-time SQLite library, as a tuple of integers.

sqlite3.PARSE_DECLTYPES
This constant is meant to be used with the detect_types parameter of the connect() function.

Setting it makes the sqlite3 module parse the declared type for each column it returns. It will parse out the first
word of the declared type, i. e. for “integer primary key”, it will parse out “integer”, or for “number(10)” it will
parse out “number”. Then for that column, it will look into the converters dictionary and use the converter
function registered for that type there.

sqlite3.PARSE_COLNAMES

This constant is meant to be used with the detect_types parameter of the connect() function.


Setting this makes the SQLite interface parse the column name for each column it returns. It will look for a
string formed [mytype] in there, and then decide that ‘mytype’ is the type of the column. It will try to find an
entry of ‘mytype’ in the converters dictionary and then use the converter function found there to return the
value. The column name found in Cursor.description does not include the type,i.e.ifyouuse something
like 'as "Expiration date [datetime]"' in your SQL, then we will parse out everything until the first '[' for the
column name and strip the preceeding space: the column name would simply be “Expiration date”.

sqlite3.connect(database[, timeout, detect_types, isolation_level, check_
same_thread, factory, cached_statements, uri])
Opens a connection to the SQLite database file database. By default returns a Connection object, unless a
custom factory is given.

database is a path-like object giving the pathname (absolute or relative to the current working directory) of the
database file to be opened. You can use ":memory:" to open a database connection to a database that resides in
RAM instead of on disk.

When a database is accessed by multiple connections, and one of the processes modifies the database, the
SQLite database is locked until that transaction is committed. The timeout parameter specifies how long the
connection should wait for the lock to go away until raising an exception. The default for the timeout parameter
is 5.0 (five seconds).

sqlite3.register_converter(typename, callable)
Registers a callable to convert a bytestring from the database into a custom Python type. The callable will be
invoked for all database values that are of the type typename. Confer the parameter detect_types of
the connect() function for how the type detection works. Note that typename and the name of the type in your
query are matched in case-insensitive manner.

sqlite3.register_adapter(type, callable)
Registers a callable to convert the custom Python type type into one of SQLite’s supported types. The
callable callable accepts as single parameter the Python value, and must return a value of the following types:
int, float, str or bytes.
sqlite3.complete_statement(sql)

Returns True if the string sql contains one or more complete SQL statements terminated by semicolons. It does
not verify that the SQL is syntactically correct, only that there are no unclosed string literals and the statement
is terminated by a semicolon.
CHAPTER-11

MODULE FUNCTIONS

 CREATING A NEW ACCOUNT

Creating a new account for the user by accepting inputs such as account number, account holder
name, type of account and minimum balance.

 DEPOSIT AMOUNT

Provides options to deposit amount from the given account number.

 WITHDRAW AMOUNT

Provides options to withdraw amount from the given account number.

 BALANCE ENQUIRY

Displays the balance in the given account.

 ALL ACCOUNT HOLDER LIST

Displays all the bank accounts stored in the banks database.

 CLOSE ACCOUNT

Closes the selected account and deletes the account from the banks database.

 MODIFY ACCOUNT

Modify the details of the user account such as current/savings.

 EXIT

Closes the banks database.


CHAPTER-12

SAMPLE CODE
import pickle
import os
import pathlib
class Account :
accNo = 0
name = ''
deposit=0
type = ''

def createAccount(self):
self.accNo= int(input("Enter the account no : "))
self.name = input("Enter the account holder name : ")
self.type = input("Ente the type of account [C/S] : ")
self.deposit = int(input("Enter The Initial amount(>=500 for Saving and
>=1000 for current"))
print("\n\n\nAccount Created")

def showAccount(self):
print("Account Number : ",self.accNo)
print("Account Holder Name : ", self.name)
print("Type of Account",self.type)
print("Balance : ",self.deposit)

def modifyAccount(self):
print("Account Number : ",self.accNo)
self.name = input("Modify Account Holder Name :")
self.type = input("Modify type of Account :")
self.deposit = int(input("Modify Balance :"))

def depositAmount(self,amount):
self.deposit += amount

def withdrawAmount(self,amount):
self.deposit -= amount

def report(self):
print(self.accNo, " ",self.name ," ",self.type," ", self.deposit)

def getAccountNo(self):
return self.accNo
def getAcccountHolderName(self):
return self.name
def getAccountType(self):
return self.type
def getDeposit(self):
return self.deposit

def intro():
print("\t\t\t\t**********************")
print("\t\t\t\tBANK MANAGEMENT SYSTEM")
print("\t\t\t\t**********************")

print("\t\t\t\t Naresh bank management system:")


print("\t\t\t\t 8688204486")
input()

def writeAccount():
account = Account()
account.createAccount()
writeAccountsFile(account)

def displayAll():
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
for item in mylist :
print(item.accNo," ", item.name, " ",item.type, " ",item.deposit )
infile.close()
else :
print("No records to display")

def displaySp(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
infile.close()
found = False
for item in mylist :
if item.accNo == num :
print("Your account Balance is = ",item.deposit)
found = True
else :
print("No records to Search")
if not found :
print("No existing record with this number")

def depositAndWithdraw(num1,num2):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
infile.close()
os.remove('accounts.data')
for item in mylist :
if item.accNo == num1 :
if num2 == 1 :
amount = int(input("Enter the amount to deposit : "))
item.deposit += amount
print("Your account is updted")
elif num2 == 2 :
amount = int(input("Enter the amount to withdraw : "))
if amount <= item.deposit :
item.deposit -=amount
else :
print("You cannot withdraw larger amount")

else :
print("No records to Search")
outfile = open('newaccounts.data','wb')
pickle.dump(mylist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')

def deleteAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
infile.close()
newlist = []
for item in oldlist :
if item.accNo != num :
newlist.append(item)
os.remove('accounts.data')
outfile = open('newaccounts.data','wb')
pickle.dump(newlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')
def modifyAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
infile.close()
os.remove('accounts.data')
for item in oldlist :
if item.accNo == num :
item.name = input("Enter the account holder name : ")
item.type = input("Enter the account Type : ")
item.deposit = int(input("Enter the Amount : "))

outfile = open('newaccounts.data','wb')
pickle.dump(oldlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')

def writeAccountsFile(account) :

file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
oldlist.append(account)
infile.close()
os.remove('accounts.data')
else :
oldlist = [account]
outfile = open('newaccounts.data','wb')
pickle.dump(oldlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')

# start of the program


ch=''
num=0
intro()

while ch != 8:
#system("cls");
print("\tMAIN MENU")
print("\t1. NEW ACCOUNT")
print("\t2. DEPOSIT AMOUNT")
print("\t3. WITHDRAW AMOUNT")
print("\t4. BALANCE ENQUIRY")
print("\t5. ALL ACCOUNT HOLDER LIST")
print("\t6. CLOSE AN ACCOUNT")
print("\t7. MODIFY AN ACCOUNT")
print("\t8. EXIT")
print("\tSelect Your Option (1-8) ")
ch = input()
#system("cls");

if ch == '1':
writeAccount()
elif ch =='2':
num = int(input("\tEnter The account No. : "))
depositAndWithdraw(num, 1)
elif ch == '3':
num = int(input("\tEnter The account No. : "))
depositAndWithdraw(num, 2)
elif ch == '4':
num = int(input("\tEnter The account No. : "))
displaySp(num)
elif ch == '5':
displayAll();
elif ch == '6':
num =int(input("\tEnter The account No. : "))
deleteAccount(num)
elif ch == '7':
num = int(input("\tEnter The account No. : "))
modifyAccount(num)
elif ch == '8':
print("\tThanks for using bank managemnt system")
break
else :
print("Invalid choice")

ch = input("Enter your choice : ")


CHAPTER-13

OUTPUTS
CHAPTER -14

CONCLUSION
“Banking System " keeps the day by day tally record as a complete banking. It can keep
the information of Account type, account opening form, Deposit, Withdrawal, and
Searching the transaction, Transaction report, Individual account opening frm, Group
Account. The exciting part of this project is; it displays Transaction reports, Statistical
Summary of Account type and Interest Information.
CHAPTER-15

BIBLIOGRAPHY

1. Charles Hampfed (2000) ‘Visual Basic’ University of


Toronto
2. Herbert Schildt (2000) ‘Visual Basic 6.0’ Tata McGraw Hill
3. John Zukowski (2000) ‘Visual Basic 6.0’ ‘BPB Publications
4. Jamie Jaworsky ‘Visual Basic 6.0’Techmedia
5. Stefen Denninger ‘Visual Basic 6.0’Author’s Press
6. Ian Somerville ‘Software engineering’
7. Rajeev mall ‘Software engineering’
8. Elmasri Navathe ‘Fundamentals of database systems’

ONLINE REFERENCE
www.w3schools.com
www.theserverside.com

You might also like