Posts

TCS PRA Exam Coding Questions

 TCS PRA Exam Coding Questions findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks findyourkicks Question 1 Create a class Payslip having attributes basicSalary,hra and ita. Create a class PaySlipDemo containing a method getHighestPF with takes a list of payslip objects and return the highest PF among the objects.PF should be 12% of the basic salary input: 2 10000 2000 1000 50000 3000 2000 output: 6000 Solution: class Payslip: def __init__(self,bs,h,t): self.bs=bs self.h=h self.t=t class Pd: def __init__(self): self.a=10 def getpf(self,l): k=[] for i in l: a=i.bs*0.12 k.append(a) k1=max(k) return int(k1) if __name_