Computer Project Work Word File
Computer Project Work Word File
def get_input():
with open("Student_details.dat",'wb') as f:
for i in range(100):
print("-",end="")
print()
choice=""
while choice=="y" :
rec=[ID,name,DOB,gender,dept,fname,mname,bg,aadhar,address,contact]
pickle.dump(rec,f)
print("Record inserted successfully.....")
def display_output():
L1=[]
f1=open("Student_details.dat",'rb')
while True:
try:
data=pickle.load(f1)
print(data)
except EOFError:
break
f1.close()
def line():
for i in range(100):
print("-",end="")
print()
#Main Program
get_input()
line()
display_output()
line()
print("Thank you.......")
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit
(Intel)] on win32
>>>
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Thank you.......
>>>
import pickle
def get_input():
with open("Staff_details.dat",'wb') as f:
for i in range(100):
print("-",end="")
print()
choice=""
while choice=="y" :
rec=[ID,name,DOB,gender,dept,q,exp,sal,bg,aadhar,address,contact]
pickle.dump(rec,f)
def display_output():
L1=[]
f1=open("Staff_details.dat",'rb')
while True:
try:
data=pickle.load(f1)
print(data)
except EOFError:
break
f1.close()
def line():
for i in range(100):
print("-",end="")
print()
#Main Program
get_input()
line()
display_output()
line()
print("Thank you.......")
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit
(Intel)] on win32
>>>
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
[101, 'Ramesh', 30071975, 'Male', 'Physics', 'PhD', '10 years', 50000, 'A+ve',
99887766554433, 'D-2, Srinivasa nagar, Tirunelveli, Tamilnadu', 9281573645]
[102, 'Shanti', 31011970, 'Female', 'Computer science', 'PhD', '12 years', 55000,
'B+ve', 918273648392, 'H-09, Gandhi nagar, Tirunelveli, Tamilnadu',
9786543213]
----------------------------------------------------------------------------------------------------
Thank you.......
>>>
import pickle
def get_input():
with open("Fee_details.dat",'wb') as f:
for i in range(100):
print("-",end="")
print()
choice=""
while choice=="y" :
rec=[ID,name,dept,t_fee,h_fee,book_fee,pnp,balance]
pickle.dump(rec,f)
L1=[]
f1=open("Fee_details.dat",'rb')
while True:
try:
data=pickle.load(f1)
print(data)
except EOFError:
break
f1.close()
def line():
for i in range(100):
print("-",end="")
print()
#Main Program
get_input()
line()
display_output()
line()
print("Thank you.......")
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit
(Intel)] on win32
>>>
----------------------------------------------------------------------------------------------------
Enter balance : 0
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Thank you.......
>>>
import pickle
def get_input():
with open("Admission_details.dat",'wb') as f:
for i in range(100):
print("-",end="")
print()
choice=""
while choice=="y" :
rec=[ID,name,DOB,gender,dept,prev_schl,board,cut_off,contact]
pickle.dump(rec,f)
L1=[]
f1=open("Admission_details.dat",'rb')
while True:
try:
data=pickle.load(f1)
print(data)
except EOFError:
break
f1.close()
def line():
for i in range(100):
print("-",end="")
print()
#Main Program
get_input()
line()
display_output()
line()
print("Thank you.......")
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit
(Intel)] on win32
>>>
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
[1202, 'Dina', 23062004, 'Female', 'B.E', 'St.Anns high school', 'State', 180,
918273645432]
----------------------------------------------------------------------------------------------------
Thank you.......
>>>
import pickle
def get_input():
with open("Transport_details.dat",'wb') as f:
for i in range(100):
print("-",end="")
print()
choice=""
while choice=="y" :
ins=str(input("Insurance : "))
rec=[ID,name,sal,contact,vehicle,v_num,c,p,ins]
pickle.dump(rec,f)
L1=[]
f1=open("Transport_details.dat",'rb')
while True:
try:
data=pickle.load(f1)
print(data)
except EOFError:
break
f1.close()
def line():
for i in range(100):
print("-",end="")
print()
#Main Program
get_input()
line()
display_output()
line()
print("Thank you.......")
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit
(Intel)] on win32
>>>
----------------------------------------------------------------------------------------------------
Enter capacity : 50
Insurance : purchased
Enter capacity : 25
Insurance : purchased
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Thank you.......
>>>