NextStep is an organization which has a pool of resource persons to conduct training workshops on various topics related to ICT. The data of all its Resource Persons is stored in a binary file RESOURCES.DAT using the following record structure (each record is a tuple):
(R_ID, R_Name, R_Expertise, Charges)
where R_ID – Resource Person's ID (An integer); R_Name – Resource Person's Name (A string); R_Expertise – Area of expertise of the Resource Person; Charges – Charges (in rupees) per hour to conduct a workshop.
For example, a record in the file is:
(12, 'P. Velusami','Machine Learning',5000)In this context, write the following user defined functions in Python:
Append() – To input the data of a Resource Person and write it in the file RESOURCES.DAT.
import pickle
def Append():
f = open('RESOURCES.DAT', 'ab')
r_id = int(input('Enter resource person ID: '))
r_name = input('Enter name: ')
r_exp = input('Enter area of expertise: ')
charges = int(input('Enter charges per hour: '))
rec = (r_id, r_name, r_exp, charges)
pickle.dump(rec, f)
f.close() Update() – To increase the Charges of each resource person by 500.
import pickle
def Update():
f = open('RESOURCES.DAT', 'rb')
data = []
try:
while True:
data.append(pickle.load(f))
except EOFError:
pass
f.close()
f = open('RESOURCES.DAT', 'wb')
for rec in data:
new_rec = (rec[0], rec[1], rec[2], rec[3] + 500)
pickle.dump(new_rec, f)
f.close() 
\( \left[ \tan^{-1}\sqrt{3} - \sec^{-1}(-2) \right] \) is equal to :
From the following Statement of Profit and Loss of Horizon Ltd., for the year ended 31st March, 2025, prepare a Common Size Statement of Profit and Loss :
| Particulars | Note No. | 2024 - 25 | 2023 - 24 |
|---|---|---|---|
| Revenue from operations | Rs 20,00,000 | Rs 10,00,000 | |
| Cost of materials consumed | Rs 10,00,000 | Rs 5,00,000 | |
| Employee benefit expenses | Rs 5,00,000 | Rs 2,50,000 | |
| Income Tax Rate | 40% | 30% |