send mail to support@abhimanu.com mentioning your email id and mobileno registered with us! if details not recieved
Resend Opt after 60 Sec.
By Loging in you agree to Terms of Services and Privacy Policy
Claim your free MCQ
Please specify
Sorry for the inconvenience but we’re performing some maintenance at the moment. Website can be slow during this phase..
Please verify your mobile number
Login not allowed, Please logout from existing browser
Please update your name
Subscribe to Notifications
Stay updated with the latest Current affairs and other important updates regarding video Lectures, Test Schedules, live sessions etc..
Your Free user account at abhipedia has been created.
Remember, success is a journey, not a destination. Stay motivated and keep moving forward!
Refer & Earn
Enquire Now
My Abhipedia Earning
Kindly Login to view your earning
Support
Type your modal answer and submitt for approval
Mr. Zack Sullivan loves programming. He joined an institute for learning. He is learning python. He learned all the python concepts like strings, lists, tuple , dictionaries etc. but he wants to learn file handling in python. He is trying to learn binary file handling. His teacher gave him partial code to write and read data from employee.dat having structure empno, name, salary. Help Zack to complete the code:
___________________ # statement 1
def addrecords():
fw= _____________ #statement 2
dict={}
ch=’y’
while ch==’y’:
eno=int(input(“enter employee number”))
nm= input(“enter employee name”)
sal=int(input(“enter employee salary”))
dict={‘empno’:eno,’name’:nm,’salary’:sal}
____________________ # statement 3
ch=input(“add more record”)
fw.close()
# function to diplay records
def display():
fr= _____________ # statement 4
dict=____________ # statement 5
fr.close()
print(“data :”,dict)
Which statement is used from the following for statement 2 to open the binary file in write mode?
open(“employee.dat”,’w’)
open(“employee.dat”,’wb’)
open(“employee.dat”,’w+’)
open(“employee.dat”,’r’)
By: santosh ProfileResourcesReport error
Access to prime resources
New Courses