Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class student:
- def __init__(self):
- self.usn= None
- self.name=None
- self.branch=None
- self.phno=None
- def read(self):
- self.usn=input("enter the usn: ")
- self.name=input("enter the name: ")
- self.branch=input("enter the branch: ")
- self.phno=input("enter the phno: ")
- def display(self):
- print(f'n{self.usn} {self.name} {self.branch} {self.phno}n')
- print(f'nusn %name branch phnon')
- n=int(input("enter number of students : "))
- for i in range(n):
- emp=student()
- emp.read()
- print("nusn name branch phnon")
- for i in student():
- emp[i].display()
- for i in student():
- emp[i].display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement