All Blogs

F.E. PPS Unit 5 Practical 8 solution

Practical 8: Create Class EMPLOYEE for Storing Details and Functions for Employee Count Problem Statement Create a class EMPLOYEE for storing details (Name, Designation, Gender, Date of Joining, Salary). Define function members to compute: Total number of employees. Count of male and female employees. Employees with salary greater than 10,000. Employees with designation “Asst Manager”. …

F.E. PPS Unit 5 Practical 8 solution Read More »

B.E. PPS Unit 5 Practical 6 solution

Practical 6: Program to Illustrate the Difference Between Public and Private Variables Problem Statement Write a Python program to illustrate the difference between public and private variables. Solution Code class Employee: def __init__(self, name, salary): self.name = name # Public variable self.__salary = salary # Private variable def display(self): print(f”Name: {self.name}, Salary: {self.__salary}”) # Creating …

B.E. PPS Unit 5 Practical 6 solution Read More »

B.E. PPS Unit 5 Practical 5 solution

Practical 5: Program to Illustrate the Use of __del__() Method Problem Statement Write a Python program to illustrate the use of the __del__() method which is called when an object is about to be destroyed. Solution Code class Employee: def __init__(self, name): self.name = name print(f”Employee {self.name} created.”) def __del__(self): print(f”Employee {self.name} is being destroyed.”) …

B.E. PPS Unit 5 Practical 5 solution Read More »

B.E. PPS Unit 5 Practical 4 solution

Practical 4: Program to Differentiate Between Class and Object Variables Problem Statement Write a Python program to differentiate between class variables and object variables. Solution Code class Employee: company_name = “TechCorp” # Class variable def __init__(self, name): self.name = name # Object variable # Creating objects emp1 = Employee(“Alice”) emp2 = Employee(“Bob”) # Accessing class …

B.E. PPS Unit 5 Practical 4 solution Read More »

Tech Amplifier Final Logo