SDLC BAnk Management System
SDLC BAnk Management System
SCHOOL
PITHORAGARH
BANK MANAGEMENT SYSTEM
Kartikay Patni
import time
#reading a text file line wise
f=open('making a file.txt','r')
count=1
for c in f:
print("count=",count,c)
count+=1
f.close()
time.sleep(3)
import time
import csv
with
open('Student_Details.csv','w',newline='')
as csvf:
writecsv=csv.writer(csvf,delimiter=',')
choice='y'
while choice.lower()=='y':
rl=int(input("Enter Roll No.: "))
n=input("Enter Name: ")
p=float(input("Enter Percentage:
"))
r=input("Enter Remarks: ")
writecsv.writerow([rl,n,p,r])
print(" Data saved in Student
Details file..")
choice=input("Want add more
record(y/n).....")
with
open('Student_Details.csv','r',newline='')
as fileobject:
readcsv=csv.reader(fileobject)
for i in readcsv:
print(i)
import pickle
def Writerecord(sroll,sname):
with open ('StudentRecord1.dat','ab')
as Myfile:
srecord={"SROLL":sroll,"SNAME":sname}
pickle.dump(srecord,Myfile)
def Readrecord():
with open ('StudentRecord1.dat','rb')
as Myfile:
print("\n-------DISPALY STUDENTS
DETAILS--------")
print("\nRoll No.",'
','Name','\t',end='')
print()
while True:
try:
rec=pickle.load(Myfile)
print(' ',rec['SROLL'],'\t
' ,rec['SNAME'])
except EOFError:
break
def Input():
n=int(input("How many records you want
to create :"))
for ctr in range(n):
sroll=int(input("Enter Roll No: "))
sname=input("Enter Name: ")
Writerecord(sroll,sname)
def SearchRecord(roll):
with open ('StudentRecord1.dat','rb')
as Myfile:
while True:
try:
rec=pickle.load(Myfile)
if rec['SROLL']==roll:
print("Roll
NO:",rec['SROLL'])
print("Name:",rec['SNAME'])
except EOFError:
print("Record not
find..............")
print("Try
Again..............")
break
def main():
while True:
print('\nYour Choices are: ')
print('1.Insert Records')
print('2.Dispaly Records')
print('3.Search Records (By Roll
No)')
print('0.Exit (Enter 0 to exit)')
ch=int(input('Enter Your Choice:
'))
if ch==1:
Input()
elif ch==2:
Readrecord()
elif ch==3:
r=int(input("Enter a Rollno to
be Search: "))
SearchRecord(r)
else:
break
main()
print("1.PUSH\n2.POP\n3.DISPLAY\n4.Exit")
choice=int(input("please select any
operations mention above"))
if(choice==1):
data=int(input("PLease enter data for
stack"))
print(data,"Inserted Succesfully")
elif (choice==2):
if (s==[]):
print("under flow")
else:
data=s.pop()
print(data, "is removed from stack")
elif choice==3:
if (s==[]):
print("stack is empty")
else:
print("_"*20)