Computer Science, asked by gaga777, 5 months ago


Write python programming for this:-

Student Details:-
NAME:Mohit
COURSE:M.TECH

Student Details:-
NAME:Vinita
COURSE:B.E

Student Details:-
NAME:Mohit
COURSE:M.TECH

Answers

Answered by Anonymous
2

Source code(Input) in python:-

class Student:

def __init__(self, name, course):

self.name = name

self.course = course

def show(self):

print("\nStudent Details :")

print("NAME :", self.name)

print("COURSE :", self.course)

s1 = Student("Mohit", "M.TECH.")

s2 = Student("Vinita", "B.E.")

s1.show()

s2.show()

del s2

s1.show()

Attachments:
Similar questions