PRACTICAL 17
Python program to perform the following operations:
1. Creating a Class with the method
2. Creating Objects of class
3. Accessing method using object
class Student:
def __init__(self, name, age, course):
self.name = name
self.age = age
self.course = course
def display_info(self):
print(f"Student Name: {self.name}")
print(f"Age: {self.age}")
print(f"Course: {self.course}")
print("-" * 30)
student1 = Student("Shruti", 18, "Computer Engineering")
student2 = Student("Anvi", 16, "Information Technology")
student3 = Student("Manthan", 21, "Mechanical Engineering")
student4 = Student("Shriya", 19, "ENTC")
print("Student Details:\n" + "=" * 30)
student1.display_info()
student2.display_info()
student3.display_info()
student4.display_info()
OUTPUT: