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
Now Mr. Zack has given the following code to modify the records of employees from employee.dat used in above code. He has to increase Rs. 2000 in the salary of those who are getting less than 15000. Mr. Zack has to find the records and change the salary in place. His teacher gave him partial code. Help him to complete the code.
import pickle as pk
found=False
emp={}
fin = ___________ #1 statement : open file both in read write mode
# read from file
try:
while true:
pos= _______ #2 store file pointer position before reading record
emp=_______ #3 to read the record in emp dictionary
if emp[‘salary’]<15000:
emp[‘salary’]+=10000
_________ #4 place file pointer at exact location of record
pickle.dump(emp,fin)
found=True
except EOFError:
if found==False:
print(“record not found”)
else:
print(“successfully updated”)
fin.close()
Choose the appropriate statement to complete #3 statement to read record in emp dictionary.
pk.read(fin)
pickle.load(fin,emp)
pk.dump(emp)
pk.load(fin)
By: santosh ProfileResourcesReport error
Access to prime resources
New Courses