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):
[Link] = name
[Link] = age
[Link] = course
def display_info(self):
print(f"Student Name: {[Link]}")
print(f"Age: {[Link]}")
print(f"Course: {[Link]}")
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: