Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Student():
- name = None
- grade = None
- tutor = None
- student1 = Student()
- student1.name = "Ridwan"
- student1.grade = "B"
- student1.tutor = "Bristol"
- student2 = Student()
- student2.name = "Harsh"
- student2.grade = "A**"
- student2.tutor = "Warwick"
- student3 = Student()
- student3.name = "Hassan"
- student3.grade = "H"
- student3.tutor = "Warwick"
- student4 = Student()
- student4.name = "Gab"
- student4.grade = "Z"
- student4.tutor = "Belfast"
- student5 = Student()
- student5.name = "knivedan"
- student5.grade = "F"
- student5.tutor = "Cardiff"
- student6 = Student()
- student6.name = "Jakaria"
- student6.grade = "R"
- student6.tutor = "Edinburgh"
- studentlist = [student1, student2, student3, student4, student5, student6]
- pos = 0
- while pos < len(studentlist):
- print("The Student,", studentlist[pos].name , "Has the grade, ", studentlist[pos].grade ,"And is in the tutor group, ", studentlist[pos].tutor)
- print("")
- pos += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement